|
Written by Hidalgo Emmanuel
|
|
Description :
The recording of the objects of a collection allows.
Value of return :
No parameter of return.
The following example modifies the level of authorization of the “users” pertaining to level 1 :
<?php
//total instanciation include_once( 'phpsimpledb.class.php' ); Global $oBDD; $oBDD = new PHPSIMPLEDB(); // recover all the “users” with “level = 1” $oUsers_col = $oBDD->getCollection( "users" ); $oUsers_col->load( "level = 1" ); // modification of activation Foreach( $oUsers_col->getObjects() as $oUser ){ $oUser->setData_field( "level", 2 ); } // recording of the modifications $oUsers_col->save();
?>
|
|