php - You have an error in your SQL syntax; -
I am trying to update a movie table and I am getting this error:
You have an error in your SQL syntax; ('
name ,
release ,
runtime ,
to use the correct syntax for manual related to your MySQL server version Check ,
description ,
value ) value ('World War' on line 1
Here's my code: Values ('$ name', '' '' $ '', '$ runtime', '$', '' release '', 'runtime', 'rating', `description`,` value`) $ Fid = $ row [']', '$', '$ value' where movie_id = '$ fidd') or die (mysql_error ()); 'Movie_id'] $$$ _ = _ = $ _ = _ ($ _ POST ['name']); $ release = ($ _POST ['release']); $ runtime = ($ _POST ['runtime'] ); $ Release = $ line ['release']; $ rating = $ line ['rating']; $ runtime = $ line ['runtime']; $ des = $ line ['description']; $ value = $ Line ['price'];
You are confusing and syntax:
UPDATE `movie` set` name` = '$ name',` release` = '$ release', 'runtime` =' $ runtime ', `rating` =' $ rating ',` statement` = '$ Dess', `value` = '$ value' Where` movie_id` = '$ fid'
Uc Additional Notes:
Fwaiai ,. See they are not maintained now? Instead, learn about it and use it or - it will help you to decide which one you choose if you choose a PDO.
I do not know where you are securing your data, so that you are open for SQL injection] ().
using mysql_real_escape_string () :
$ name = mysql_real_escape_string ($ _ POST ['name']); does not give any purpose unless you see another query after that.
Fields on this line are unnecessary:
$ release = ($ _POST ['release']);
Comments
Post a Comment