|
Written by Hidalgo Emmanuel
|
|
Description :
Allows to count the number of element of an expression.
Parameter :
$oData, (string or array of string) : The parameter will be either of standard table of value, or of standard string. If this one is of standard table, the elements of the table will be assembled with operator SQL “AND”.
Value of return :
Return a integer representing the result of the counting of the elements.
The following example counts the number of “users” having a level of authorization equalizes to 1 :
<?php
//total instanciation include_once( 'phpsimpledb.class.php' ); Global $oBDD; $oBDD = new PHPSIMPLEDB(); // count the number of “users” nonvalid $oUsers_col = $oBDD->getCollection( "users" ); $iNbr_users = $oUsers_col->count( "level = 1" );
?>
|
|