Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Empty or truncate table with RedBean PHP?

Tags:

sql

php

orm

redbean

I'm using RedBean PHP for testing purposes and I like it very much, however I have no idea how I can truncate a table. I can fetch all the beans and delete them, but that seems cumbersome.

like image 425
A v Wieringen Avatar asked Sep 15 '25 06:09

A v Wieringen


1 Answers

In RedBean 1.3 you can use R::wipe($type) to truncate a table.

like image 140
mav Avatar answered Sep 16 '25 23:09

mav