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

Guests: 15

112.111.x.x forum
112.111.x.x forum
175.42.x.x forum
175.44.x.x forum
175.44.x.x forum
204.12.x.x signup
220.161.x.x forum
220.181.x.x forum
36.248.x.x forum
5.63.x.x news
50.16.x.x forum
66.249.x.x dilbertplus
66.249.x.x dilbertplus
91.237.x.x forum
94.249.x.x rss

Last Seen

ODDBALL118 Tue 22:37
Dodgeitorelse Tue 21:38
EFiNST0RM Tue 20:40
»Stefan Tue 18:07
xMin Tue 17:49

Newest Members

Forums
Add Player Name, Score, Timp
AGENTUL
Sat Oct 30 2010, 07:31AM

Posts: 33
Joined: Sun Apr 11 2010, 11:50AM
Registered Member #5960
I make a code where player name, score, timp add in database but i don't know here put this code for add the info in database for all server.


<?

$baza 
mysql_query("SELECT * FROM jucator WHERE nume = '{$player['name']} AND server = '{$lgsl_server_id}'");
if(
mysql_num_rows($baza) > )
{
mysql_query("UPDATE jucator SET nume = '{$player['name']}', score = score + {$player['score']}, timp = timp + {$player['time']} WHERE server = '{$lgsl_server_id}'");
}
else
{
mysql_query("INSERT INTO jucator (server, nume, score, timp) VALUES ('{$lgsl_server_id}', '{$player['name']}', '{$player['score']}', '{$player['time']}')");
}

?>


any idee?

PS: i put this code in lgsl_details but the info has add in database only if i see the info from this server, i want to add info from all server no only one.
DiMaN-VRN
Sat Oct 30 2010, 09:31AM

Posts: 80
Joined: Sun Feb 22 2009, 02:11PM
Registered Member #4842
смотри в сторону cron
Website
AGENTUL
Sat Oct 30 2010, 11:57AM

Posts: 33
Joined: Sun Apr 11 2010, 11:50AM
Registered Member #5960
english please )
 

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