Re: hi, guys, please help me with this problem.
| From: | Andreas Karajannis | Date: | Sat, 08 Jul 2000 08:32:00 +0000 |
| Subject: | Re: hi, guys, please help me with this problem. | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-973@lists.php.net to get a copy of this message | ||
Eric Wang wrote:
>
> I have a problem with php and oracle.
> so far I still think this a defect of php.
> you know, this is a dataset in asp which we can use page or something,
> let the actually records we got just were limited to 1 page.
> but php seems has no such fuction.
> so i tried everything I can do to make i can get the same result with
> php, so far no luck.
>
> anybody can make php only get the 20 to 40 records from this sql
> statement?
>
> select * from table1 where a=b order by c
>
Try
select * from (select * from table1 where a=b order by c) where
rownum<40
minus
select * from (select * from table1 where a=b order by c) where
rownum<20
You'll need the subqueries to make shure the ROWNUM condition is applied
after sorting the rows.
-Andreas