Re: Re: DB getRow() and limit 1

From: Date: Wed, 24 Nov 2004 22:23:23 +0000
Subject: Re: Re: DB getRow() and limit 1
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-15802@lists.php.net to get a copy of this message
Justin Patrin wrote:
On Wed, 24 Nov 2004 22:59:29 +0100, Lukas Smith <lsmith@php.net> wrote:
Brice Joly wrote:
Hi, I'm wondering whether getRow() includes an auto-appended "limit 1" or if it has to be manually added into the SQL query to avoid searching through the whole table once the expected record has been found. Same question for getOne().
no it does not.
Because some DB backends don't support it or have different syntax for it? Could the backends which support it implement a wrapper which adds it?
there is emulation in place for all relevant drivers to handle limit. however in some cases its rather nasty, so the best way is just to write proper queries. regards, Lukas

« previous php.pear.general (#15802) next »