CLASS DB: undefined function: query()

From: Date: Mon, 15 Jul 2002 13:29:56 +0000
Subject: CLASS DB: undefined function: query()
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-1887@lists.php.net to get a copy of this message
With PHP 4.2.1 and PEAR vers. 1.3 on Windows 2000 I got this error: Fatal error: Call to undefined function: query() I tried to use MySQL database through PEAR DB. With this short testprogram I got the same error: <?php include('dbinfo.php'); require_once( 'DB.php' ); $db = DB::connect( "mysql://$dbuser:$dbpass@$dbhost/$dbname" ); $sql = 'SELECT * FROM demo'; $demoResult =& $db->query($sql); while ($demoRow = $demoResult->fetchRow()) { echo $demoRow[2] . '<br>'; } $db->disconnect(); ?> Fatal error: Call to undefined function: query() in e:\....\pear-test.php on line 6 I've also tried other versions (PHP 4.1.2, PEAR 1.2) with the same result. What's going wrong? Thanks for help, Jürgen Neu __________________________________________________________________ Gesendet von Yahoo! Mail - http://mail.yahoo.de Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de

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