helpt with DB->query() error
| From: | Michael Switzer | Date: | Fri, 25 Oct 2002 20:45:22 +0000 |
| Subject: | helpt with DB->query() error | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-2544@lists.php.net to get a copy of this message | ||
After form submittal I call -
$online = Account::login($_POST['un'],$_POST['pw']);
I receive an error
Fatal error: Call to undefined function: query()
pointing to this code, specifically the line highlighted below
class Account {
function login($username,$password) {
$db = DB::connect($connection_string);
$sql = "select * from $acctTblName where $acctUsrFld='$username' AND
$acctPwdFld='$password'";
//------- the line below -----------
$result = $db->query($sql);
Anyone have ideas on why this isn't working?