Re:

From: Date: Wed, 23 Apr 2003 13:23:22 +0000
Subject: Re:
Groups: php.db 
Request: Send a blank email to php-db+get-27300@lists.php.net to get a copy of this message
out of curiousity....why not use LIMIT? knowing this may better help to answer your question. an idea(maybe not a good one) you could get a count of all records, get the first X records and then get the rest of them using a where clause. WHERE PRIMARY_KEY > $record_num - or - if the records are not sequential, keep the initial keys in an array and use WHERE PRIMARY_KEY NOT IN (".implode("','", $array).")". which would look like WHERE PRIMARY_KEY NOT IN ('5','7','9')...the ' could be dropped if you were looking for only numbers but would still work this way. hth jeff "nikos" <nikos@qbit.gr To: "Matt Schroebel" <MSchroebel@hsus.org> > cc: "PHP-mailist" > <php-db@lists.php.net> Subject: Re: [PHP-DB] 04/23/2003 09:16 AM Thanx Matt but it doesn't help me much. I need a solution without using LIMIT. ----- Original Message ----- From: Matt Schroebel To: nikos ; PHP-mailist Sent: Wednesday, April 23, 2003 3:47 PM Subject: RE: [PHP-DB] > -----Original Message----- > From: nikos [mailto:nikos@qbit.gr] > Sent: Wednesday, April 23, 2003 8:22 AM > To: PHP-mailist > Subject: [PHP-DB] > With LIMIT we can select (lets say) the first 3 records. > How can I select the rest of the records without LIMIT? Read the comments in the manual here: http://www.mysql.com/doc/en/LIMIT_optimisation.html -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#27300) next »