|
Method setData_field( $sName, $sValue ) |
|
Written by Hidalgo Emmanuel
|
Description : This method adds or updates a property of an object Parameters : $sName, string : Represent the name of the field to be updated $sValue, string or numeric : Represent the value to be updated Value of return : Turn over “true” if the field were updated Turn over “false” if the field were not updated
The example following the my up to date name one “user”: <?php //total instanciation include_once( 'phpsimpledb.class.php' ); Global $oBDD; $oBDD = new PHPSIMPLEDB(); //loading of "user" $oUser = $oBDD->getObject( "users" ); $oUser->load( 21 ) ; //update of the name $oUser->setData_field( "name", "durant" ); //recording of "user" $oUser->save();
?> |
|