Results 1 to 14 of 14

Thread: [Resolved] MySQL: DELETE FROM problems

Threaded View

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    [Resolved] MySQL: DELETE FROM problems

    SQL Statement: DELETE FROM vbsNews_news ORDER BY postedOn LIMIT 1
    Error: You have an error in your SQL syntax near 'ORDER BY postedOn LIMIT 1' at line 1

    I double-checked the tablename and fieldname and they are both correct (capitalization and all). So what am I doing wrong?

    I also tried throwing in a DESC/ASC and WHERE statement to see if it needed those, but no luck.

    What I'm trying to do is delete ALL the records in a table EXCEPT for the last X amount (most recent X added).

    So where did I screw up?
    Last edited by The Hobo; Oct 16th, 2003 at 12:13 PM.
    My evil laugh has a squeak in it.

    kristopherwilson.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width