RE: [PEAR] Pear Pager with ODBC - just me being stupid

From: Date: Fri, 11 Jan 2002 20:11:33 +0000
Subject: RE: [PEAR] Pear Pager with ODBC - just me being stupid
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-656@lists.php.net to get a copy of this message
OK, it was just me being stupid....left out: $res = $db->query($sql); hmmmmm Sorry for the alarm! Simon H -----Original Message----- From: Simon H [mailto:simon.hamilton@ntlworld.com] Sent: 11 January 2002 20:10 To: Simon H Subject: RE: [PEAR] Pear Pager with ODBC - bug, or just me being stupid? Importance: High Sensitivity: Private OK, it was just me being stupid....left out: $res = $db->query($sql); hmmmmm Sorry for the alarm! Simon H -----Original Message----- From: Simon H [mailto:simon.hamilton@ntlworld.com] Sent: 11 January 2002 20:00 To: Pear-General Subject: [PEAR] Pear Pager with ODBC - bug, or just me being stupid? Importance: High Sensitivity: Private I'm having trouble with the pager, when trying to run a while statement to generate data below the pager itself. I am using an Access DB on Windows for this one (hence ODBC), so I have removed error checking and done manual $numrows. The pager displays and works perfectly, its just when I try the fetchRow in the while statement: Code ----------- while ($row = $pager->fetchRow(DB_FETCHMODE_ASSOC)) { echo "$row[Name]"; } ----------- Error Message ----------- Fatal error: Call to a member function on a non-object in D:\php\pear\Pager.php on line 75 ----------- Pager.php line refered to ----------- 69 function fetchRow($mode=DB_FETCHMODE_DEFAULT) 70 { 71 $this->current++; 72 if ($this->current >= $this->top) { 73 return null; 74 } 75 return $this->res->fetchRow($mode, $this->current); <<<<<<<<<<<<< 76 } ----------- The "current" displays ok in the pager itself, so I dont see how this is related. Any ideas anyone? TIA Simon H -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, e-mail: pear-general-unsubscribe@lists.php.net For additional commands, e-mail: pear-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.pear.general (#656) next »