in reply to MySQL finding other rows

$sth = $dbh->prepare("SELECT * FROM poll WHERE id < '5' LIMIT 0, 1") Thats how I would do cause you would get the first result thats under five.

Replies are listed 'Best First'.
Re: Re: MySQL finding other rows
by andrew (Acolyte) on Jul 21, 2002 at 17:49 UTC
    I just got done doing this :)
      ahh, thats was bad here
      $sth = $dbh->prepare("SELECT * FROM poll WHERE id < '$id' ORDER BY 'id +' DESC LIMIT 0, 1");
        thats from mine