function undefined
| From: | Michael Hall | Date: | Mon, 19 Aug 2002 12:49:57 +0000 |
| Subject: | function undefined | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-2153@lists.php.net to get a copy of this message | ||
G'day:
I am getting "Call to undefined function" error messages when I try to use
PEAR DB functions like this (PHP 4.2.1 on RH7.2). I'm getting error
messages with both "fetchInto" and "fetchRow". What am I doing wrong?
<?php
require_once("DB.php");
$dsn = "mysql://someuser:somepwd@localhost/somedb";
$db = DB::connect($dsn);
if (DB::isError($db)) {
die ($db->getMessage());
}
$sql = "SELECT * FROM sometable";
$result = $db->query($sql);
while ($result->fetchInto($row)) {
echo $row[1];
}
?>
TIA
Mick