Re: [rfc] Row limit support for Pear DB
| From: | Morgan Christiansson | Date: | Wed, 31 Oct 2001 22:10:15 +0000 |
| Subject: | Re: [rfc] Row limit support for Pear DB | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-2495@lists.php.net to get a copy of this message | ||
Tomas V.V.Cox wrote:
(snip)
## Planed Support ## mysql -> altering query pgsql -> altering query oci8 -> altering query ibase -> unsupported rest -> emulated with the fetch row by number feature (Note: for the last two I'll be glad to hear better ideas)I THINK that oracle has something like this: SELECT * WHERE rownum BETWEEN ($from,$to) i'm not sure if oracle supports the BETWEEN syntax though but otherwise it would be SELECT * WHERE rownum <= $from AND rownum >= $to Although it was more than a year ago i used oracle, and i didn't use it very much. :)
This feature is limited to SELECT statementsIn mysql it is possible to use LIMIT with UPDATE and DELETE. If the programmer is sure that the query will only update x row(s), so that if you run "UPDATE table SET something='string' WHERE id='123' LIMIT x" it won't run trough the rest of the table searching for something it already found, i'm not sure how it works if it's a primary/unique index though.
Tomas V.V.Cox