开发者

Problem getting information from the database

开发者 https://www.devze.com 2023-01-27 04:07 出处:网络
I am using the following query function footGames() { global $database; $q = \"SELECT name FROM \".TBL_GAME.\" WHERE active = \'1\' AND type = \'soccer\'\";

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

精彩评论

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