Welcome Guest, Not a member yet? Register   Sign In
mysql_real_escape_string() expects parameter 1 to be string, array given
#1

(This post was last modified: 04-22-2016, 10:32 PM by cupboy.)

Code:
 foreach($q->result_array() as $row) {        
       $descs[] = mysql_real_escape_string($row);   //  Message: mysql_real_escape_string() expects parameter 1 to be string, array given
How can I apply the function to just the value or how can I make the value a string? I used to know how to do this, but have forgotten.

If I attempt to fix the problem with the quotes inside the view instead I get this error:
Message: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user....
Reply


Messages In This Thread
mysql_real_escape_string() expects parameter 1 to be string, array given - by cupboy - 04-22-2016, 10:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB