Welcome Guest, Not a member yet? Register   Sign In
mysql_escape_string error message?
#11

[eluser]Unknown[/eluser]
I had the same error but the problem was not the framework but rather an invalid database connection / database problem.

The framework first checks if mysql_real_escape_string exists and if the db connection is a valid ressource. But I have to admit that checking both at the same time is a little strange.

Code:
// relevant code snippet in function escape_string() in drivers/mysql/mysql_driver.php around line 301:

  if (function_exists('mysql_real_escape_string') AND is_resource($this->conn_id))
  {
   $str = mysql_real_escape_string($str, $this->conn_id);
  }
  elseif (function_exists('mysql_escape_string'))
  {
   $str = mysql_escape_string($str);
  }
  else
  {
   $str = addslashes($str);
  }
#12

[eluser]Unknown[/eluser]
Just ran into this problem - Use @hasokeric's solution, by changing `function escape_str($str, $like = FALSE)`

If it still doesn't work restart your MySQL server.





Theme © iAndrew 2016 - Forum software by © MyBB