this is the function
function update_time($fieldName, $wait){
$waittime = time() + $wait;
$next = date("Y-m-d H:i:s", $waittime);
$query = "UPDATE ".$this->table[0]." SET '".$fieldname."' = '". $next ."' WHERE id= '".$this->id."' ";
mysql_query($query,$this->dblink) or die(mysql_error());
}
and this is where it is passed
$this->update_time('next_crime', $this->wait[$x]);
i dont see anything wrong with the previous syntax nor with the following error, can someone help please
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' = '2009-01-26 08:54:13' WHERE id= '1'' at line 1
please help me on how to fix this error

New Topic/Question
Reply




MultiQuote




|