Delete all rows from a table with CODEIGNITER

How to remove all rows from a table using codeigniter. Just the line that I know, just specify the identifier from that line, but what about all the lines at once? Thanks

+5
source share
1 answer
$this->db->empty_table('my_table'); 

Put it in your model and don’t point it anywhere before.

+11
source

Source: https://habr.com/ru/post/1261470/


All Articles