This is an outdated version of the Manual. Visit the NEW Manual

Deleting a Bean

To remove a bean from the database:


    R
::trash$book );

To delete more beans of type book:


    R
::trashAll$books );

To delete all beans of type book:


    R
::wipe'book' );

You can also empty an entire database with the R::nuke() command. Be very careful with this!

Next: learn how to stop RedBeanPHP from modifying the schema any further; before deploying your RedBeanPHP based application you should freeze the database.


 
 

RedBeanPHP Easy ORM for PHP © 2014 Gabor de Mooij and the RedBeanPHP community - Licensed New BSD/GPLv2