[PHP] why do i get this error please tell me?

2002-08-31 Thread Victor

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 SQL syntax near 'order=1 WHERE ID='2'' at line
2

- Victor  www.argilent.com


__ 
Post your ad for free now! http://personals.yahoo.ca

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] why do i get this error please tell me?

2002-08-31 Thread Chris Knipe

 
 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 unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] why do i get this error please tell me?

2002-08-31 Thread victor

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 not be so.

- Victor  www.argilent.com

-Original Message-
From: Chris Knipe [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, August 31, 2002 1: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' WHERE ID='2'

Or, rename the order column to something else.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

__ 
Post your free ad now! http://personals.yahoo.ca

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] why do i get this error please tell me?

2002-08-31 Thread Mark Charette

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:[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, ahhh.. You'd thing they put
reserved names right besides the damn mysql command in the manual. Alas
it shall not be so.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE: [PHP-DB] RE: [PHP] why do i get this error please tell me?

2002-08-31 Thread victor

I meant besides the UPDATE or SELECT or any filed that those words might
interfere with...

- Victor  www.argilent.com

-Original Message-
From: Mark Charette [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, August 31, 2002 2:18 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP-DB] RE: [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:[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, ahhh.. You'd thing they put
reserved names right besides the damn mysql command in the manual. Alas
it shall not be so.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

__ 
Post your ad for free now! http://personals.yahoo.ca

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] RE: [PHP-DB] RE: [PHP] why do i get this error please tell me?

2002-08-31 Thread Mark Charette

Then check the MySQL manual using the URL I posted!

PHP doesn't care about the hundred or so reserved MySQL words. MySQL does.
Perhaps you're confusing the two. Please check what I said:

PHP != MySQL

The documentation for each is separate. PHP has convenience functions for
talking to a MySQL database. It does not parse or check your SQL statements
for correctness - it just passes them along and lets the MySQL library do
its work. PHP does this for a great number of products: cURL, GD functions,
various ODBC interfaces, etc. It's up to you to read the support docs for
those products to use them fully. The docs for PHP don't need to be
cluttered with deep and detailed explanations of every supported interface,
not would I expect them to.

-Original Message-
From: victor [mailto:[EMAIL PROTECTED]]

I meant besides the UPDATE or SELECT or any filed that those words might
interfere with...

- Victor  www.argilent.com

-Original Message-
From: Mark Charette [mailto:[EMAIL PROTECTED]]

hem. 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:[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, ahhh.. You'd thing they put
reserved names right besides the damn mysql command in the manual. Alas
it shall not be so.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php