Problem getting information from the database
I am using the following query
function footGames()
{
global $database;
$q = "SELECT name FROM ".TBL_GAME." WHERE active = '1' AND type = 'soccer'";
return mysql_query($q, $dat开发者_JS百科abase->myConnection);
}
The $database->myConnection is the following
function myConnection() {
return $this->connection;
}
$database is the class that myConnection is in.
Any ideas why the footGames method isn't working?
Thanks
myConnection
is a function, you need to call it (note the parentheses):
return mysql_query($q, $database->myConnection());
精彩评论