Calling a MySQL stored procedure without return value triggers a mysql_num_rows() return type warning - 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: Calling a MySQL stored procedure without return value triggers a mysql_num_rows() return type warning (/showthread.php?tid=41511) |
Calling a MySQL stored procedure without return value triggers a mysql_num_rows() return type warning - El Forum - 05-10-2011 [eluser]LeonardoGaiero[/eluser] Greetings, I believe I found a bug in how raw MySQL queries are handled by codeIgniter. I have a function in my model that calls a database stored procedure, which looks like this: Code: function insertAtt($savedName, $realName, $fileSize, $table, $ID) { What this code does is make a raw call to the insertAtts procedure, which looks like this: Code: -- -------------------------------------------------------------------------------- So there is no direct return value to this procedure. The query works and all; however, the result of $this->db->query() seems to be triggering this error: Code: ERROR - 2011-05-10 11:21:52 --> Severity: Warning --> mysql_num_rows() expects parameter 1 to be resource, boolean given E:\HelpTest\system\database\drivers\mysql\mysql_result.php 37 What I'm guessing is that the query is expecting a dataset to be returned, instead of the boolean representing the success or failure of the query. Can this behavior be confirmed, and if so, are there any better methods of calling stored procedures? (I didn't actually take the time to RE the database drivers to find out the former, sorry about that.) Thanks in advance, please let me know your collective thoughts. Calling a MySQL stored procedure without return value triggers a mysql_num_rows() return type warning - El Forum - 05-16-2011 [eluser]LeonardoGaiero[/eluser] Still no reply? All I'd like is to figure out this warning. |