unexpected mysql error:

thread: 3 messages  |  last: a year ago  |  started: thursday, february 11, 2010, 3:24 pm pst


#1  |  kingwithin (San Francisco, CA) United States of America
Thursday, February 11, 2010, 3:24 PM PST

Help!

Was working okay, but then got this error which doesn't give me any context for what to look into:

http://stackoverflow.com/questions/2248542/unexpected-mysql-error-saying-must-be-an-instance-of-mysqli-result

#2  |  Mike Ho (Sunnyvale, CA) United States of America Qcodo Administrator
Thursday, February 11, 2010, 4:30 PM PST

What does your call stack say?

Look through your call stack in the Qcodo-generated error page, and eventually you will get to the line of code in your application (e.g. outside of the Qcodo framework files) which is responsible for triggering the error / issue.

#3  |  Fernando Lordán (Barcelona, CAT, Spain) Spain
Thursday, February 11, 2010, 10:35 PM PST

It seems clear to me that it's a MySql error, not a Qcodo related one. Your query returns false for some reason (bad SQL construction, DB server disconnection, or whatever), so when going to build the Qcodo result object the constructor receives a boolean false instead of a DB “mysqli_resource”. Thus the type error message, that is self-explanatory.

Address the MySql error and everything will be fine. If it's in the code, use the call stack dumped in the error page to trace and find the cause. It helps a lot.



Copyright © 2005 - 2012, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.