Database driver barfs out a warning on num_rows - 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: Database driver barfs out a warning on num_rows (/showthread.php?tid=36533) |
Database driver barfs out a warning on num_rows - El Forum - 12-05-2010 [eluser]LeonardoGaiero[/eluser] Greetings. I am having a bit of a problem I was hoping I could get help with: I'm developing an application, with a file upload function. The uploading part is managed by the application, while the referencing of the file on the DB is handled with a stored procedure. However, I am getting a MySQL warning in my logs whenever I try to execute this function: Code: ERROR - 2010-12-05 14:42:44 --> Severity: Warning --> mysql_num_rows(): supplied argument is not a valid MySQL result resource E:\HelpDesk\system\database\drivers\mysql\mysql_result.php 37 And I have identified the culprit to be in the PHP code, but I can't quite pinpoint it. This is the model function: Code: function insertAtt($savedName, $realName, $fileSize, $table, $ID) { and this is how the controller calls it: Code: $this->helpdesk_model->insertAtt( I'm quite stumped as to how it would fail, and I'm not sure how to trace it back either; I know this is a long shot, but does anyone see anything blatantly wrong that needs addressing? Thanks in advance, hope someone can help. [EDIT] It also bears mentioning that all the passed parameters are either strings, or integers, and that the variable names are in proper caps; I checked already. |