marcusami
05-06-2008, 01:09 PM
hey im pretty new at mysql but i have got a site going that you post info on and it is recorded in the database
but now i am trying to edit it from a webpage
i can call up the info so its displayed and ready to be edited, but I cant save the edit to the same id
when i do
mysql_query("INSERT INTO trailers
(t_Name, t_Price, t_Loc, t_Desc, t_Loc_a, t_Loc_b, t_File) VALUES('$theName', '$thePrice', '$theTarget', '$theDesc', '$theTarget_a', '$theTarget_b', '$aFileName') WHERE id = '$hold_Id' ")
or die(mysql_error());
i get a error of
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 'WHERE id = '193'' at line 2
but now i am trying to edit it from a webpage
i can call up the info so its displayed and ready to be edited, but I cant save the edit to the same id
when i do
mysql_query("INSERT INTO trailers
(t_Name, t_Price, t_Loc, t_Desc, t_Loc_a, t_Loc_b, t_File) VALUES('$theName', '$thePrice', '$theTarget', '$theDesc', '$theTarget_a', '$theTarget_b', '$aFileName') WHERE id = '$hold_Id' ")
or die(mysql_error());
i get a error of
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 'WHERE id = '193'' at line 2