Jonathan, What happens if you take out the comma before the WHERE (as well)?
=dn ----- Original Message ----- From: "Paul DuBois" <[EMAIL PROTECTED]> To: "Jonathan Underfoot" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: 23 November 2001 17:41 Subject: Re: [PHP-DB] PHP & MySql > At 4:16 PM -0700 4/8/01, Jonathan Underfoot wrote: > >I'm getting an Invalid Query error after inputting the following > > > ><connect to Server> > ><select DB> > > > >$sql_query = "UPDATE commentary SET com_num=$com_num, com_by=$com_by, > >com_band=$com_band, com_title=$com_title, com_release=$com_release, > >com_rating=$com_rating, com_body=$com_body, com_type=$com_type, WHERE > >com_num=$com_num"; > >$result = mysql_query ($sql_query) > >or die ("Invalid query / error"); > > > >This is all directly from a form. The variables are all valid. I've tried > >making the query something like > >"UPDATE commentary SET com_release=test WHERE com_num=8" and even that > >dosen't work. > > test is a string and requires quotes around it. Your query is indeed > invalid. > > > > >Ideas? > > > >Thanx, > > > >-Jonathan Underfoot > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]