Home > Archive > PHP SQL > November 2004 > Change all except the last X
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Change all except the last X
|
|
|
| Hello there,
With the SQL Update statement, I try to remove all articles from the
front page of Drupal, except for the last X.
What I did:
UPDATE node SET promote=0 WHERE promote=1 ORDER BY created ASC LIMIT 10
, 1000
Which should remove all from the frontpage except the youngest ten.
But I don't know what I am doing wrong. It returns:
#1064 - You have an error in your SQL syntax near 'ORDER BY created ASC
LIMIT 10, 1000' at line 1
Could somebody help me?
René
| |
|
|
No ORDER BY clause in an UPDATE statement unless you are using MySQL
4.*
---
Steve
|
|
|
|
|