I ask for help with the syntax of the UPDATE query.
There is a system_contacts table with 22 fields. I'm trying to update some of them, I get an error:
Warning: mysql_query(): 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 '( 'company_name' = 'rr', 'company_address' = '', 'company_person'' at line 2 in D:\data\contact_edit.php on line 23 Ошибка - 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 '( 'company_name' = 'rr', 'company_address' = '', 'company_person'' at line 2 Request to contact_edit.php :
$query = "UPDATE system_contacts SET ( 'company_name' = '".$_POST["company_name"]."', 'company_address' = '".$_POST["company_address"]."', 'company_person' = '".$_POST["company_person"]."', 'phone_1' = '".$_POST["phone_1"]."', 'phone_2' = '".$_POST["phone_2"]."', 'phone_3' = '".$_POST["phone_3"]."', 'phone_4' = '".$_POST["phone_4"]."', 'phone_5' = '".$_POST["phone_5"]."', 'work_time' = '".$_POST["work_time"]."', 'skype' = '".$_POST["skype"]."', 'site' = '".$_POST["site"]."') WHERE 'id_position' = '45' "; $usr = mysql_query($query); // строка 23 if(!$usr) exit ("Ошибка - ".mysql_error()); I rummaged everything I could. What could be the error and where to dig?