Username:    Password:        Click Here To Signup     Forgotten Password
Main Menu
Online
Members: 0

Guests: 44

123.125.x.x news
144.76.x.x dilbertplus
151.80.x.x forum
151.80.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x dilbertplus
46.229.x.x forum
46.229.x.x forum
46.229.x.x dilbertplus
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
46.229.x.x forum
5.102.x.x lgsl
5.255.x.x news
5.9.x.x dilbertplus
54.196.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x lgsl
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x forum
54.36.x.x dilbertplus
54.36.x.x lgsl
54.36.x.x dilbertplus
54.36.x.x forum
54.36.x.x forum
54.36.x.x lgsl
54.36.x.x lgsl
66.249.x.x forum
91.242.x.x dilbertplus

Last Seen

Wussie Mon 01:59
Dodgeitorelse Mon 16:49
85filip58 Wed 12:06
Bommel Mon 18:20
Apophis01 Wed 12:35

Newest Members

Forums
LGSL CRON (Get Players from server and insert in custom column where id=server)
lqlqlq
Sun Nov 10 2013, 05:56PM
Posts: 22
Joined: Fri Apr 29 2011, 11:18AM
Registered Member #6716
Here is my try:

<?php
require "lgsl4/lgsl_files/lgsl_config.php";
$link1  mysql_connect($lgsl_config['db']['server'], $lgsl_config['db']['user'], $lgsl_config['db']['pass']) or die(mysql_error());
require 
"lgsl4/lgsl_files/lgsl_class.php";
$server_list lgsl_query_cached_all("sep");
$server_list lgsl_sort_servers($server_list);

foreach (
$server_list as $server)
{
$i 1;
while (
$i <= $server_list){
$pl $server['s']['players'];
mysql_query("UPDATE lgsl SET h4='$pl'");
}
}


?>


but without success.
any ideas?
Dodgeitorelse
Sun Nov 10 2013, 07:13PM
Posts: 246
Joined: Sun Dec 12 2010, 09:16AM
Registered Member #6457
would seem you have more going on than just this code. What is it you are trying to do? just show the players and no other info?


lack of effort on your part requires less effort on my part
Website
lqlqlq
Mon Nov 11 2013, 05:07AM
Posts: 22
Joined: Fri Apr 29 2011, 11:18AM
Registered Member #6716
Yes, only players.
Dodgeitorelse
Mon Nov 11 2013, 08:44AM
Posts: 246
Joined: Sun Dec 12 2010, 09:16AM
Registered Member #6457
not sure why you want to store all the names in the database. If you are just wanting to store the names how would you expect all the names to go into one cell in your h4 column at each server? there is only one cell per server so if there were 30 players on one server then you would be trying to put all 30 names into that one cell which means you would have to write your code to organize the names into that one cell for example, player1, player2, player3 and so on. if you are just trying to show the current players for all servers then I wouldn't worry about storing them in the database. It sounds to me that you are wanting to just store the names to have a record of all players that ever played on a server. Is this correct?

lack of effort on your part requires less effort on my part
Website
abc123456
Sat May 26 2018, 03:18AM
Posts: 102
Joined: Sat May 26 2018, 03:12AM
Registered Member #8888
[ REQUIRES ADMIN APPROVAL ]
 

Jump:     Back to top


You are not logged in - Click Here To Signup

Username:    Password:   

Mini Buttons

.... © GreyCube.com - Richard Perry - Powered by e107.org