Hi,
$db is not an object, but a link identifier returned by mysql_connect().
Wieger
Ender wrote:
>
> 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]
> [EMAIL PROTECTED]
--
Wieger Uffink
tel: +31 20 428 6868
fax: +31 20 470 6905
web: http://www.usmedia.nl
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]