How to truncate table with query in codelgniter?



How to truncate table with query in codelgniter?..

Answer / Vaibhav Shukla

"To truncate a table in CodeIgniter, you can use the DB class and execute the TRUNCATE command. Here's an example:

```php
$this->db->truncate('table_name');
```

Remember to replace 'table_name' with the name of your table."n

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More CodeIgniter Interview Questions

List the resources that can be autoloaded in codeigniter?

1 Answers  


What is csrf attack in codeigniter?

1 Answers  


What is codeigniter template?

1 Answers  


How to do 301 redirects in codeigniter?

1 Answers  


Explain application flow chart in codeigniter?

1 Answers  


What is mvc codeigniter?

1 Answers  


Explain the codeigniter library. How will you load it?

1 Answers  


Explain how you can prevent codeigniter from csrf?

1 Answers  


How do I find out the id of the row I just inserted?

1 Answers  


Can I extend the core database class?

1 Answers  


how to create application at codeigniter ?

1 Answers  


How to check data is updated or not in codeigniter

1 Answers  


Categories