Welcome Guest, Not a member yet? Register   Sign In
Call to a member function real_escape_string() on boolean
#5

(11-08-2017, 10:24 PM)kaustubh.agrawal2000 Wrote: but not sure why its failing only when there is string in where clause ??
I mean. everything works fine when I select on primary key....

It's not failing because there's a string in the WHERE clause.
It's the exact opposite - a connection is required to escape the string, and because the connection has failed before that (or was never created in the first place), the escaping of the said string fails.

You're not getting the error on a select() call because there's nothing to escape in there and thus no attempt is made to use the DB connection. That doesn't mean it works fine; it will still fail when the query is actually executed, which happens after you call get().

(11-08-2017, 10:24 PM)kaustubh.agrawal2000 Wrote: Is it something to do with the sessions library ??

No.
Reply


Messages In This Thread
RE: Call to a member function real_escape_string() on boolean - by Narf - 11-09-2017, 04:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB