Re: Fetching PEAR DB in a set
| From: | Graham Clarke | Date: | Tue, 23 Dec 2003 00:46:52 +0000 |
| Subject: | Re: Fetching PEAR DB in a set | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9782@lists.php.net to get a copy of this message | ||
Check the docs on pear.php.net for best description -- you have choices
$result = _however_you_get_your_PEAR::DB_recordset()
// this creates an indexed array $my_data where each row is an associative array w/ keys = column names
while ($r = $result->fetchRow(DB_FETCHMODE_ASSOC)) {
$my_data[] = $r;} At 09:26 AM 12/22/2003 -0800, Sanjay wrote:
How do I fetch say 20 records at a time. I am using Oracle database. Suppose my query returns 1000 records but I want to fetch 20 records at on time and then display these 20 records on your page and then you keep fetching next 20 records and so on.. How should I do it in PEAR DB. Thanks SanjayGraham Clarke GrahamC@53Tech.com www.53Tech.com 603.643.9955