queerfm
07-13-2009, 05:00 AM
Hi i need to find out what this error is
Fatal error: Call to a member function query() on a non-object in /home/*****/public_html/beta/system/articals/artical.php on line 15
the code is
<?php
require_once("configuration.php");
$vconfig = new VConfig();
$dbData = new DBData("localhost","$vconfig->user","$vconfig->dbpass","$vconfig->db");
class DBData extends DBConnect{
public function title(){
$result=$DBData->query('SELECT * FROM push_content');
$row=$result->fetch_assoc();
//echo user's password
print $row['title'];
}
}
?>
There is something wrong with this $result=$DBData->query('SELECT * FROM push_content');
but from what i have worked out its something wrong with the $result=$DBData->query
If any one can help that would be great.
Thanks
Fatal error: Call to a member function query() on a non-object in /home/*****/public_html/beta/system/articals/artical.php on line 15
the code is
<?php
require_once("configuration.php");
$vconfig = new VConfig();
$dbData = new DBData("localhost","$vconfig->user","$vconfig->dbpass","$vconfig->db");
class DBData extends DBConnect{
public function title(){
$result=$DBData->query('SELECT * FROM push_content');
$row=$result->fetch_assoc();
//echo user's password
print $row['title'];
}
}
?>
There is something wrong with this $result=$DBData->query('SELECT * FROM push_content');
but from what i have worked out its something wrong with the $result=$DBData->query
If any one can help that would be great.
Thanks