Im trying to create a update statement using php to update a clients profile.
$sql_insert = "UPDATE company
SET owner = '$owner' , street_ad = '$street_ad' , state = '$state' , zip = '$zip' , email = '$email' , phone = '$phone' , desc = '$desc'
WHERE company_name = '$company' ";
$result_insert= mysql_query($sql_insert);
if(!$result_insert)
{
die ("Error on insert: " . mysql_error());
}
This is the actual statment. I checked all the variable names and colum names to make sure it wasnt a spelling mistake but Im still getting this error "Error on insert: 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 'desc = 'Test' WHERE company_name = 'Tiki Website Productions'' at line 2"
Does anyone have an suggestions?