Re: Querying a database for 50 users' information: 50 queries or a WHERE array?

From: Date: Wed, 14 Sep 2011 21:03:31 +0000
Subject: Re: Querying a database for 50 users' information: 50 queries or a WHERE array?
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.general 
Request: Send a blank email to php-general+get-314858@lists.php.net to get a copy of this message
On Wed, Sep 14, 2011 at 21:01, Alex Nikitin <niksoft@gmail.com> wrote: > You can use a limit with a nested select, you just can't use it in > some cases, like inside an "IN" statement, but something like this > should work: > > SELECT id, data, etc FROM table JOIN (SELECT special_id as id FROM > special_table ORDER BY special_id LIMIT 0, 1000) AS table2 USING (id) > > Note: syntax may not be valid, but should be fairly straight forward > to fix, have no time to play with it though... > Thanks. -- Dotan Cohen http://gibberish.co.il http://what-is-what.com

« previous php.general (#314858) next »