Req #13907 [Com]: Oracle Fetch row by row number
| From: | lildurk13907 at gmail dot com | Date: | Wed, 01 Sep 2021 18:42:59 +0000 |
| Subject: | Req #13907 [Com]: Oracle Fetch row by row number | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-236271@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=13907&edit=1
ID: 13907
Comment by: lildurk13907 at gmail dot com
Reported by: jh at synergy dot cx
Summary: Oracle Fetch row by row number
Status: Not a bug
Type: Feature/Change Request
Package: Feature/Change Request
Operating System: all
PHP Version: 4.0.6
Assigned To: maxim
Block user comment: N
Private report: N
New Comment:
Lil Durk is a private agency dedicated to providing responsible access to legal cannabis for adults
aged 19 and older. Weâre an exclusively online retailer and wholesaler for recreational
cannabis and a trusted source for information about cannabis and cannabis-related issues. We believe
our work is meaningful and we take pride in our mandate to promote the socially responsible use of
legal cannabis. https://lildurk.com/
Previous Comments:
------------------------------------------------------------------------
[2006-04-03 09:57:08] tony2001@php.net
Yes, you have to emulate LIMIT in Oracle using 3 nested SELECTs. This is the way it works.
------------------------------------------------------------------------
[2003-01-30 06:29:17] maxim@php.net
Just to follow up:
Yes, to select the first 6 rows you can use subselects (besides there are other methods):
SELECT * FROM
(SELECT ename, hiredate FROM emp ORDER BY hiredate)
WHERE ROWNUM < 6
Nevertheless, you still have selected the full stream in the subselected query *and* from the
received result you've extracted the first 6 rows.
What I am wondering here is, whether it could actually make any sense of having the offset functions
that pretty much limit the Fetch loop inside OCI8 extension.
Doesn't seem to me a clean method, but if this saves on speed and functionality/usability there
is then a space for this function.
Will look into it in details
------------------------------------------------------------------------
[2003-01-30 06:23:40] maxim@php.net
It is probably true. Will soon close it as bogus. I am still curious to see whether there is any
"technical" way for it through OCI first.
------------------------------------------------------------------------
[2003-01-29 12:07:11] michael dot mauch at gmx dot de
Probably he/she doesn't really need a new function, but only a hint how to simulate the
limit/offset syntax of MySQL/Postgresql.
Without the help of <http://www.dclp-faq.de/q/q-oracle-limit.html>
(in German, but not much text), I certainly would not know how to do it, although I asked our local
SQL gurus.
------------------------------------------------------------------------
[2003-01-29 08:59:05] maxim@php.net
Well, this wouldn't make much sence as this should be controlled by your SQL. What's the
point to grab the whole table in your buffer to then fetch only a few rows somewhere in the middle?
Anyhow, will assign it to myself for now.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=13907
--
Edit this bug report at https://bugs.php.net/bug.php?id=13907&edit=1