Firefox 3
Quick navigation:

ptb_count

Finds number of records in given $database. If $condition is given, only records that follow it are counted.

Syntax

$var = ptb_count($database[, $condition = '']);

Syntax description

$database
variable containing connected database
$condition
optional: condition upon which records should be counted

Return

This function returns integer; if $database is not an array, it returns 0 (unlike count, which returns 1).

Sample(s)

$c = ptb_count($myDatabase); $c = ptb_count($myDatabase, "'name' == '{$_GET['name']}'");

History

ptb_count accepts $condition since version 1.1