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?
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.
$this->db->query('ALTER TABLE tbl_name AUTO_INCREMENT 1');
is working for me.