trying to get rid of double entrys in the master server ( I can't explain why they still happened before from time to time. )

This commit is contained in:
Titus Tscharntke 2013-02-17 01:19:35 +00:00
parent 87a4eb49e4
commit e771b53f1c
1 changed files with 8 additions and 0 deletions

View File

@ -194,6 +194,14 @@
$country = '';
}
}
// cleanup old entrys with same remote port and ip
// I hope this fixes those double entrys of servers
mysql_query( 'DELETE FROM glestserver WHERE '.
'externalServerPort=\''. mysql_real_escape_string( $service_port ) . '\', ' .
' AND ' .
'ip=\'' . mysql_real_escape_string( $remote_ip ) . '\', '
);
// insert new entry
mysql_query( 'INSERT INTO glestserver SET ' .
'glestVersion=\'' . mysql_real_escape_string( $glestVersion ) . '\', ' .
'platform=\'' . mysql_real_escape_string( $platform ) . '\', ' .