[PHP] Call to a member function on a non-object

2001-05-07 Thread Ender

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.

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]



[PHP] Simple Questions

2001-05-08 Thread Ender

Okay few questions, I am pretty new to this hehe.

If I have a number say, 123.123.123.123.

$ip = 123.123.123.123;

How do I put a starting " and an ending " to make it

"123.123.123.123"

AND

This doesn't work:

echo("$server->server_num_players."/".$server->server_max_players");

What do I need to do to put a / between the two variables?


Best regards,

Ender [Clan Leader]
[EMAIL PROTECTED]



[PHP] Putting quotes in?

2001-05-08 Thread Ender

Okay I am taking a number from a mySQL database and I want to put quotes on that 
number?

How would I do this?

$databasenumber = 123.123.123.123;

How do I make 
$databasenumber = "123.123.123.123";

To:
runprogram("hls",$databasenumber);

Best regards,

Ender [Clan Leader]
[EMAIL PROTECTED]



[PHP] Old PHP.net website..

2001-05-09 Thread Ender

Does anyone remember the previous php.net website where you would hold 
your cursor over a menu bar and it would pop up info?  Does anyone know 
how to do that or where the script for it is?

Best regards,

Ender [Clan Leader]
[EMAIL PROTECTED]