Пример #1
0
/** obsolete, use DB::countRecords */
function countRecords($tnm, $where = array())
{
    global $db;
    $q = new Select($db, $tnm);
    $q->addFields('COUNT(*)');
    $q->addWhereArray($where);
    $q->run();
    $q->fetch();
    $count = $q->at(0);
    $q->close();
    return $count;
}