Hello!
| From: | Sean Chambers | Date: | Fri, 14 Jun 2002 20:05:29 +0000 |
| Subject: | Hello! | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-1665@lists.php.net to get a copy of this message | ||
Hi everybody.
I've been using PEAR DB for about 3 months now and I like it a lot...I
have some basic questions though.
When I try to do the following it doesn't seem to work:
// Get page match from DB
$sql = "SELECT * FROM page WHERE pnumber='$p'";
$page_data = $db->getRow($sql);
$page_data->numRows($sql);
It tells me: Fatal error: Call to a member function on a non-object on
line 67 (the $page_data->numRows() line)
It works if I do it like so:
$page_data = $db->query($sql);
But then this makes it more difficult because I know which record I
want, and when I attempt to access $page_data['text'] I would have to do
it in a while loop which is a pain since there is only one record
returned
Can I find the number of rows returned if I do a quick record grab like
that or must I do $db->query? Thanks for your help.
Sean Chambers
Web Developer
Vann Data Technology Centre
Daytona Beach, FL
(386) 238-1200 ext. 1205
chamberss@vanndata.com