View Single Post
  #1 (permalink)  
Old May 2nd, 2005, 04:12 PM
statusquo statusquo is offline
Registered User
Join Date: May 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default ch 6 commit.php problem updating movie table

Hello everyone.

I made the changes to commit.php as shown on pg 186 of chapter 6, but I get a sql error when I try to edit a movie. The error message I get is : Invalid 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 ''movie_name' = 'Test2', 'movie_year' = '2005', 'movie_type' = '

This is my query statement :
$sql = "UPDATE movie 
        'movie_name' = '".$_POST['movie_name']."', 
        'movie_year' = '".$_POST['movie_year']."', 
        'movie_type' = '".$_POST['movie_type']."', 
        'movie_leadactor' = '".$_POST['movie_leadactor']."', 
        'movie_director' = '".$_POST['movie_director']."' 
        'movie_id' = '".$_GET['id']."'";
 I have been looking at this for hours and can't find the error... my eyes are tired Any help would be appreciated. TIA