you can use the meta column rownum e.g. where rownum<20 note: you need to do subselects and (where rownum > 1) will never return a line !!! you could use something like select * from select rownum "rownumber", mydata from mytable order by mycol ) where rownumber > 10 and rownumber < 20; should work ... 2. i know there is a phpfunction for that ocifetchedrows or something like that mk -----Ursprungliche Nachricht----- Von: Valerio Ferrucci [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 13. Februar 2001 12:54 An: [EMAIL PROTECTED] Betreff: [PHP-DB] php and OCI Hi, I'm using php with oracle to select data in a db. 1) My code is: putenv("ORACLE_HOME=/xx"); putenv("ORACLE_SID=xx"); $conn = ociLogon("xx","xx","xx"); $st = ociparse($conn,"select * from myTable order by MYFIELD"); $res = ociexecute($st,OCI_DEFAULT); while(ocifetch($st)) { ... } This is ok, BUT: I want to show records in pages with 20 records each one. How can I obtain this? I see that php asks all thousands records to (remote) oracle server, slowing time. Is there something like: ociexecute($st,OCI_DEFAULT, fromRec, toRec); 2) How can I know the total records in current selection? Thanks ================================================================== Valerio Ferrucci Tabasoft Sas [EMAIL PROTECTED] http://tabasoft.ancitel.it [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]