DB Not working correctly...

From: Date: Sun, 15 Jun 2003 20:19:22 +0000
Subject: DB Not working correctly...
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-5969@lists.php.net to get a copy of this message
To: pear-general@lists.php.net I'm new to PEAR and to the mailing list. What I need is help, using DB. DB works fine with PHP installed on my personal computer (Windows), however, on my web host (A Cpanel server) it connects, but can't run queries to that database. I have been able to use both Mail, and Mail_Mime with no problems. My code is as simple as the following: <.php include "DB.php"; $db = DB::connect("$server://$user:$password@$host/$database"); $query = "SELECT * FROM ps_config WHERE site=1"; $result = $db->query($query) or error("I could not connect to the PageSite configuration table in the SQL database."); $config = $result->fetchRow(DB_FETCHMODE_ASSOC); ?.> (Period inserted so it doesn't become code) Anyhow, the error I get is: Fatal error: Call to undefined function: query() in /home/insyder/public_html/beta/index.php on line 70 Now it doesn't matter whether or not I use my copy of DB (latest) or the copy that my host has installed on their server (not sure on ver). Can anyone help me with this? Thanks. - Stan Lemon

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