Need Quick help with WHERE Query Statement

Discussion in 'PHP' started by nkiegrea, Jun 29, 2007.

  1. #1
    Hello all. I need some quick help.

    I want to display 9 out of the however many items are in this list of things.

    I can do this.. BUT what I need is that I want to display 9 items starting with the 5th newest item in the interval.

    $q=@mysql_query("SELECT id,name,category,rating FROM games WHERE DATE_SUB(CURDATE(),INTERVAL 30 day) < added ORDER BY added DESC LIMIT 9",$DBCON);
    
        $count=5;
    PHP:
    I thought the $cout=5 would do the trick, but its not doing the job.

    Any help would be grateful and rep awarded. :D

    Thanks
    Zack
     
    nkiegrea, Jun 29, 2007 IP
  2. Acecool

    Acecool Peon

    Messages:
    267
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    LIMIT 5, 9

    will start at row 6 and display
    6 7 8 9 10 11 12 13 14
     
    Acecool, Jun 29, 2007 IP
    nkiegrea likes this.
  3. nkiegrea

    nkiegrea Peon

    Messages:
    355
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Amazing! Thanks. Thats all I needed!

    =)

    _Zack
     
    nkiegrea, Jun 30, 2007 IP
  4. Acecool

    Acecool Peon

    Messages:
    267
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No problem :) Glad to be of help
     
    Acecool, Jun 30, 2007 IP