php and OCI
| From: | Valerio Ferrucci | Date: | Tue, 13 Feb 2001 11:54:12 +0000 |
| Subject: | php and OCI | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-6573@lists.php.net to get a copy of this message | ||
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
valfer@flashnet.it http://tabasoft.ancitel.it
taba@flashnet.it