{'From'}.'", `To` = "'.$obj->{'To'}.'", `Type` = "'.$obj->{'Type'}.'", `Cls` = "'.$obj->{'Cls'}.'", `Lag` = "'.$obj{'Lag'}.'" WHERE Id = "'.$obj->{'Id'}.'"'; $r = mysql_query($q); if(!$r){ echo '{"success": false, "error": "'.db_error($q).'"}'; } } echo json_encode($array);