Project

General

Profile

Feature #19786 ยป 00010091_v2.patch

Administrator Admin, 2009-01-10 16:11

View differences:

t3lib/class.t3lib_db.php (Arbeitskopie)
return $output;
}
/**
* Counts the number of rows.
*
* @param string $field: Name of the field to use in the COUNT() expression (e.g. '*')
* @param string $table: Name of the table to count rows for
* @param string $where: (optional) WHERE statement of the query
* @return mixed Number of rows counter (integer) or false if something went wrong (boolean)
*/
public function exec_SELECTcountRows($field, $table, $where = '') {
$count = false;
$resultSet = $this->exec_SELECTquery('COUNT(' . $field . ')', $table, $where);
if ($resultSet !== false) {
list($count) = $this->sql_fetch_row($resultSet);
$this->sql_free_result($resultSet);
}
return $count;
}
......
/**************************************
*
* Query building
    (1-1/1)