Hey, why the hell I get multiple rows by the same IP in SQL ? Like I create them when player connects, but I check this:
PHP Code:
format(szTemp,charsmax(szTemp),"SELECT * FROM `players` WHERE (`players`.`player_ip` = '%s')", szIp);
PHP Code:
if(SQL_NumResults(Query) > 1)
{
/// here I retrieve all information that I need from SQL
}
else
{
//INSERT INTO ...
}
My table looks like this:
Quote:
player_id INT(6) NOT NULL AUTO_INCREMENT PRIMARY KEY,\
player_ip varchar(32),\
player_name varchar(32),\
|
...
Where is the problem because every time I enter the server. The new row is created for me, even if there is already a row with that IP.