Then you do need it, but like Paul said, you need MySQL 4.x, or you need
to run two queries, one to retrieve the row you want to update, and one
to do the update.

Regards,
Mike Hillyer
www.vbmysql.com


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Monday, June 23, 2003 4:21 PM
> To: wayne
> Cc: [EMAIL PROTECTED]
> Subject: RE: UPDATE and ORDER BY
> 
> 
> Hi, I left out the LIMIT 1 in the example I copied... I only want the 
> first occurance updated.
> 
> 
> 
> 
> 
> 
> "wayne" <[EMAIL PROTECTED]>
> 23/06/2003 23:22
> 
>  
>         To:     <[EMAIL PROTECTED]>
>         cc:     <[EMAIL PROTECTED]>
>         Subject:        RE: UPDATE and ORDER BY
> 
> 
> Have you tried it without it? I cannot seen a reason for using it...
> With out it all records in subscriptions will be updated with pick+1
> where username='webmaster' and dbname..... 
> 
> Wayne
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: 23 June 2003 23:09
> To: [EMAIL PROTECTED]
> Subject: UPDATE and ORDER BY
> 
> 
> Hi,
> 
> Any ideas why I get an error when i use ORDER BY in an UPDATE 
> statement?
> 
> Also is there anywhere i can lookup the error codes?
> 
> UPDATE `Subscriptions` SET picks=picks+1 WHERE (username = 'webmaster'
> AND 
> picksdatabasename = 'BetaTestService') ORDER BY subscriptionid ASC 
> 
> ADODB.Connection.1 error '80004005' 
> 
> SQLState: 42000
> Native Error Code: 1064
> [TCX][MyODBC]You have an error in your SQL syntax near 'ORDER 
> BY price 
> ASC' at line 1
> 
> Thanks in advance.
> Martin
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 
> 
> 
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    
> http://lists.mysql.com/mysql?> [EMAIL PROTECTED]
> 
> 

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to