The sql_count()
function returns the number of rows for a selection resource opened with sql_select()
.
It accepts 3 parameters:
-
$res
is the resource identifier for a selection, -
$serveur
, -
$option
.
It is used as shown below:
$res = sql_select('column', 'table');
if ($res and sql_count($res)>2) {
// checks to see if there are at least 3 rows in the results!
}