ARC Delete/Insert creates additional ID - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: ARC Delete/Insert creates additional ID (/showthread.php?tid=39190) |
ARC Delete/Insert creates additional ID - El Forum - 03-03-2011 [eluser]Unknown[/eluser] I'm not sure exactly why this is happening, and I don't know if this is a bug or not. I have a simple table. Here is the create statement for it. Code: CREATE TABLE `brokerage_zip_range` ( I have code that looks like this in a model: Code: public function assign_zip_range($brokerage_id, $zip_code_list) { (Please note that for reasons I won't get into here, I can't just make this an update statement). The problem I am having is that while this code executes fine, the inserted record is incremented by more than one. So, prior to the execution of this code, the record might look like: Code: id zip_code brokerage_id After I run the code (say, with zip code 92222), it now looks like: Code: id zip_code brokerage_id The next auto increment value should be 8, not 9. Am I doing something wrong or is this a CI thing? Also, I will point out that I have tried running this code by itself in CI, meaning there are no other operations happening at all before or after it. |