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

#4
(12-10-2014, 03:01 PM)bboom Wrote: When I use the load->database with the seccond param TRUE, I get the error

Code:
Severity: Error

Message: Call to a member function real_escape_string() on a non-object

Filename: mysqli/mysqli_driver.php

Line Number: 321

This happened after upgrade from codeigniter 2 to 3. I cannot find the problem in the upgrading guide.

The code I use is:

PHP Code:
$ci =& get_instance();
$this->userdb $ci->load->database('default'TRUE);

$qres $this->userdb->get($this->table_name); 

Is 'autoinit' set to TRUE for this database? If not, you must call db_connect() manually before executing any queries.
Reply


Messages In This Thread
RE: Call to a member function real_escape_string() on a non-object - by Narf - 12-11-2014, 02:59 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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