How to execute
ALTER TABLE tblname AUTO_INCREMENT = 123
as codeigniter active records query?
There is something called dbforge->modify_column() in codeigniter , do i have to use that, if so how?
try this
$this->db->query("ALTER TABLE table_name AUTO_INCREMENT 1");
change value after AUTO_INCREMENT
where you want to start auto increment value from like this
$this->db->query("ALTER TABLE table_name AUTO_INCREMENT 12");
Alter table operation called DDL Data Defination Language where you execute queries at database not at data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With