delete all lines from a table with CODEIGNITER
Asked Answered
V

2

10

How can I delete all lines from a table with codeigniter. Just a line I know, just specify the id from this line, but what about all lines at once? Thanks

Vasti answered 18/12, 2016 at 20:27 Comment(1)
You mean an SQL table?Garibaldi
E
24
$this->db->empty_table('my_table');

Put it in your model and don't give any where before that.

Elastin answered 18/12, 2016 at 21:12 Comment(0)
H
0

Use truncate() in your model to delete all rows

Habitable answered 13/2 at 17:23 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Traitor

© 2022 - 2024 — McMap. All rights reserved.