• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Call to a member function real_escape_string() on boolean

#5
(11-08-2017, 11: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, 11: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, 05:01 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.