开发者

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());
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜