Call to a member function on a non-object

From: Date: Tue, 08 May 2001 04:01:24 +0000
Subject: Call to a member function on a non-object
Groups: php.general 
Request: Send a blank email to php-general+get-51854@lists.php.net to get a copy of this message
Okay I get the: Call to a member function on a non-object error when trying to execute this script: It happens in this area: $db=mysql_connect(localhost,'***','***') or die("Unable to connect to database"); $edlist = new EditList("serverId", "hlstats_Servers", "server"); $edlist->columns[] = new EditListColumn("game", "Game", 0, true, "hidden", $gamecode); $edlist->columns[] = new EditListColumn("address", "IP Address", 15, true, "ipaddress", "", 15); $edlist->columns[] = new EditListColumn("port", "Port", 5, true, "text", "27015", 5); $edlist->columns[] = new EditListColumn("name", "Server Name", 22, true, "text", "", 64); $edlist->columns[] = new EditListColumn("rcon_password", "Rcon Password", 10, false, "text", "", 48); $edlist->columns[] = new EditListColumn("publicaddress", "Public Address", 20, false, "text", "", 64); $edlist->columns[] = new EditListColumn("statusurl", "Status URL", 20, false, "text", "", 255); if ($HTTP_POST_VARS) { if ($edlist->update()) message("success", "Operation successful."); else message("warning", $edlist->error()); } ?> Enter the addresses of all servers that you want to accept data from here.<p> <?php $result = $db->query(" SELECT serverId, address, port, name, publicaddress, statusurl, rcon_password FROM hlstats_Servers WHERE game='cstrike' ORDER BY address ASC, port ASC "); More specificially it happens on this line: $result = $db->query(" What am I doing wrong here? Best regards, Ender [Clan Leader] ender@particlesun.com

« previous php.general (#51854) next »