Welcome Guest, Not a member yet? Register   Sign In
escape string problem

I am trying to query my database using a variable $uname which i pull from a session. If i dump the variable it looks like this
string(7) "tom4444".
When i run my query

$query = $this->db->get();

I get the following error message
string(7) "tim1965" object(CI_DB_mysql_result)#15 (7) { ["conn_id"]=> resource(45) of type (mysql link persistent) ["result_id"]=> resource(55) of type (mysql result) ["result_array"]=> array(0) { } ["result_object"]=> array(0) { } ["current_row"]=> int(0) ["num_rows"]=> int(1) ["row_data"]=> NULL }

I am guessing that it is blowing up on the double quotes in the variable, but i thought these were escaped automatically using active records.

My db is
username varchar(12) property_id mediumint(20) date_time_created timestamp
ad_completed varchar(1)
Can anybody see anything i am missing ?

Messages In This Thread
escape string problem - by El Forum - 01-12-2009, 06:15 AM
escape string problem - by El Forum - 01-12-2009, 07:19 AM

Theme © iAndrew 2016 - Forum software by © MyBB