I have a table that has a primary key that autoincrements. Everytime I insert a row to that table, and use mysql_insert_id()
to get the last id inserted for that table, it returns 0.
What other possible problems could there be?
I have a table that has a primary key that autoincrements. Everytime I insert a row to that table, and use mysql_insert_id()
to get the last id inserted for that table, it returns 0.
What other possible problems could there be?
Use the method that OpenCart provides:
$this->db->getLastId()