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

Deleting a Bean

To remove a bean from the database:

::trash$book );

To delete more beans of type book:

::trashAll$books );

To delete all beans of type book:

::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 © 2019 Gabor de Mooij and the RedBeanPHP community - Licensed New BSD/GPLv2