for($i = 0; $i sizeof($check); $i++) { # start repating query
# turn pictures in order delete capability off
mysql_query(UPDATE kodak_user_pictures
SET order=1
WHERE ID='$check[$i]') # turn off pictures
or die ('Unable to turn bit off '.mysql_error());
} # end repeat
You have an error in your
You have an error in your SQL syntax near 'order=1 WHERE ID='2'' at line
2
ORDER is a reserved word in MySQL.
Change the query and escape order aswell
'order'='1' WHERE ID='2'
Or, rename the order column to something else.
--
PHP General Mailing List (http://www.php.net/)
To
:30 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] why do i get this error please tell me?
You have an error in your SQL syntax near 'order=1 WHERE ID='2'' at
line
2
ORDER is a reserved word in MySQL.
Change the query and escape order aswell
'order'='1
, 2002 1:35 PM
To: 'Chris Knipe'; [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: [PHP] why do i get this error please tell me?
Yep, figured it just now, thanks anyway, ahhh.. You'd thing they put
reserved names right besides the damn mysql command in the manual. Alas
it shall
: [PHP] why do i get this error please tell me?
Ahem. Why not check out the MySQL docs for reserved words (they _are_
right
there ...):
http://www.mysql.com/doc/en/Reserved_words.html
PHP Docs are for PHP. MySQL Docs are for MySQL. PHP != MySQL.
-Original Message-
From: victor [mailto
. PHP != MySQL.
-Original Message-
From: victor [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 31, 2002 1:35 PM
To: 'Chris Knipe'; [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: RE: [PHP] why do i get this error please tell me?
Yep, figured it just now, thanks anyway
6 matches
Mail list logo