|
Method delete( $bDeleteCollections = false ) |
|
Written by Hidalgo Emmanuel
|
Description : This method removes an object of the database. Parameter : $bDeleteCollection (optional), boolean : This parameter allows the release of the removal of the objects in cascade, all the collections of the children objects will be also removed (attention, the concept of level of suppression does not exist). Value of return : Turn over “true” if the object could be removed. Turn over “false” if the object could not be removed (if this one is not present in the base of data, “false” is returned). The following example illustrates the removal of a product : <?php //total instanciation include_once( 'phpsimpledb.class.php' ); Global $oBDD; $oBDD = new PHPSIMPLEDB(); //recovery of the product $oProduit = $oBDD->getObject( "produits" ) ; $oProduit->load( 12 ) ; //remove the product $oProduit->delete() ;
?>
|
|