CI model queries coming up empty - 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: CI model queries coming up empty (/showthread.php?tid=22222) |
CI model queries coming up empty - El Forum - 09-01-2009 [eluser]wp4nuv[/eluser] Hello all, I'm in the process of deploying a CI app and even though during production all queries executed successfully, upon deployment query execution is spotty: only 2 queries successfully complete. DB connection is through OCI8 to Oracle 10g and has been verified to be running normally. One would think that if there was a problem with the DB connection, no queries would execute. Has anyone seen this behaviour? They fail with this error: Quote:Fatal error: Call to a member function row() on a non-object in /var/www/daily_cash/system/application/views/main_view.php on line 51 This are lines 51 through 55 of that view: Quote: Here's an example of one of my controller functions and some of it's corresponding models (the remaining queries are very similar): BTW, session data has been verified as well; it's writing correctly, so where there is mention of session data, it's all there correctly. Code: function main() Code: function directors_all($fecha){ Pedro Maldonado CI model queries coming up empty - El Forum - 09-02-2009 [eluser]n0xie[/eluser] Have you tried returning the result object instead of the whole db object? It's a long shot but it might be worth a try. Change Code: return $query; Code: return $query->row(); Change Code: <?$row1 = $query1->row();?> Code: <?php $row1 = $query1; ?> CI model queries coming up empty - El Forum - 09-08-2009 [eluser]wp4nuv[/eluser] I did try your suggestion, yet the result is the same. It's as if the connection wasn't being made to begin with. Curious thing is that I can connect with any client w/o problems and do the same queries, so the tnsnames.ora file is correct. |