Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004
    Posts
    1

    Arrow Unanswered: prints latest rows, but excludes X number

    Hi, looking for some assitance -

    I'm trying to print the last 9 rows from a table, but wish to exclude (don't print) the last 3 row at any given time

    PHP Code:
    $result mysql_query ("SELECT * FROM covers ORDER BY cid DESC LIMIT 9"); 
    Any help?

  2. #2
    Join Date
    Aug 2003
    Location
    India
    Posts
    109
    I am not sure whether I understand you here .. If you do not want to print the "LAST 3 ROWS" of the recordset at any point , then why do you need to specify the number "9". Instead you can alter your query like " LIMIT 6" .

    But if you need to eliminate the "LAST 3 ROWS OF THE TABLE" , then you can give it as "LIMIT 3,9" . Not sure whether this would answer your question.Can you come up with an example?

    Celia

Posting Permissions

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