![]() |
supplied argument is not a valid MySQL-Link resource - 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: supplied argument is not a valid MySQL-Link resource (/showthread.php?tid=38026) |
supplied argument is not a valid MySQL-Link resource - El Forum - 01-28-2011 [eluser]Konfine[/eluser] Hi All, I've recently set an application live and have done the usual thing to set PHP error reporting off and turned the error message logs on. I've just checked my logs this morning and found about 3 occurences of the following line: ERROR - 2011-01-27 04:30:20 --> Severity: Warning --> mysql_query(): supplied argument is not a valid MySQL-Link resource /[DOMAIN INFO]/html/system/database/drivers/mysql/mysql_driver.php 163 This line points to the execute function, how can I tell using the error logs (which was executed by another user) where the error lies in my application? I take it this reflects to a SQL syntax error? Any help appreciated. Thanks supplied argument is not a valid MySQL-Link resource - El Forum - 01-28-2011 [eluser]gwelter[/eluser] I think that would have to do with a problem connecting to your database and not the query itself. I'm surprised that line reported an error, as it has the @ error suppression symbol preceding the call to mysql_query(). I don't think there's a way to tell in the logs where in your own code the query call is originating other than to put an error_log($sql); just before the return statement you mention (it's never a good idea to modify CI's core, but if you're desperate enough and change it back, it might help). |