CodeIgniter Forums
affected_rows doesn't work - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: affected_rows doesn't work (/showthread.php?tid=60677)



affected_rows doesn't work - El Forum - 05-29-2014

[eluser]Unknown[/eluser]
affected_rows doesn't work. Anyone stumbled upon this problem too?
edit: This problem shows only on firebird driver.


affected_rows doesn't work - El Forum - 05-29-2014

[eluser]InsiteFX[/eluser]
It's a hack for MySQL.

Displays the number of affected rows, when doing "write" type queries (insert, update, etc.).

Note: In MySQL "DELETE FROM TABLE" returns 0 affected rows. The database class has a small hack that allows it to return the correct number of affected rows. By default this hack is enabled but it can be turned off in the database driver file.