|
Method load( $oData = NULL ) |
|
Written by Hidalgo Emmanuel
|
|
Description :
The loading of a collection allows.
Parameter :
$oData (optional), (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”. If this parameter is omitted, all the recordings of the collection will be returned.
Value of return :
Return “true” if the loading of the collection is carried out correctly. Return “false” if the collection did not go up any recording.
The following example recovers the “users” pertaining to level 1 and not bearing the name of “during” :
<?php
//total instanciation include_once( 'phpsimpledb.class.php' ); Global $oBDD; $oBDD = new PHPSIMPLEDB(); // loading of the “users” with “name != ‘durant’” and “level = 1” $oUsers_col = $oBDD->getCollection( "users" ); $oUsers_col->load( array( "name != 'durant'", "level = 1" ) );
?>
|
|