Invisible mysql row - 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: Invisible mysql row (/showthread.php?tid=1794) |
Invisible mysql row - El Forum - 06-27-2007 [eluser]xwero[/eluser] When i do an insert with the same code but other values the row doesn't get displayed in the table but the auto_increment has gone up a number and the code igniter affected_rows function displays 1. I have seen this behaviour before but i never knew what caused this, it disappeared somehow. I'm working with mysql version 3.23 (shared hosting) I hope someone can explain this and offer a solution, i searched for it but i haven't found one. Invisible mysql row - El Forum - 06-27-2007 [eluser]xwero[/eluser] I hunted the problem down to a variable that is like the following code Code: $query = $this->db->query('select nr from table'): The insert query breaks on the count variable. I tried to cast it but with no luck. Invisible mysql row - El Forum - 06-28-2007 [eluser]xwero[/eluser] i'm back to mysql for the problem. The fieldtype is int(10) ,it was varchar(200). The field takes the value 0 and it takes 1 sometimes but nothing above one. Any mysql guru who can solve the problem? Invisible mysql row - El Forum - 06-28-2007 [eluser]xwero[/eluser] Another change in the problem Code: $this->db->query('select name from table where id=?',array($id)); So there is a value for the name variable but it breaks the insert statement somehow. i tried (string)$row['name'] but with no result. |