Re: PHP & MySql
| From: | olinux | Date: | Mon, 09 Apr 2001 04:07:08 +0000 |
| Subject: | Re: PHP & MySql | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-8369@lists.php.net to get a copy of this message | ||
Try removing the last comma in your update statement
change:
com_type=$com_type, WHERE
to:
com_type=$com_type WHERE
olinux
----- Original Message -----
From: "Jonathan Underfoot" <Jonathan@Underfoot.cc>
To: <php-db@lists.php.net>
Sent: Sunday, April 08, 2001 4:16 PM
Subject: [PHP-DB] PHP & MySql
> 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.
>
> Ideas?
>
> Thanx,
>
> -Jonathan Underfoot
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com