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

(05-29-2018, 12:36 PM)php_rocs Wrote: @thiago.bittencourt,

Why don't you have CI print the query so that you can see it.  This way you can see what generated query is being run.
Here is the link: (The function that you need is $this->db->get_compiled_select()) https://www.codeigniter.com/userguide3/d...cting-data

I did it, and I got the query and ran in my MySQL editor, and it worked.

So, to workaround this, I got the full query returned by $this->db->get_compiled_select() and ran into $this->db->query():

PHP Code:
$query $this->db->get_compiled_select();

$queryResult $this->db->query($query); 

And now it's working.
Reply


Messages In This Thread
RE: Call to a member function real_esp - by thiago.bittencourt - 05-30-2018, 02:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB