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:

  1. 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.

  2. I do not know where you are securing your data, so that you are open for SQL injection] ().

  3. using mysql_real_escape_string () : $ name = mysql_real_escape_string ($ _ POST ['name']); does not give any purpose unless you see another query after that.

  4. Fields on this line are unnecessary: ​​ $ release = ($ _POST ['release']);

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -