|
Senior Member
Join Date: Jan 2015
Location: India,kolkata
|
03-11-2021
, 19:48
Re: SQL Problem
|
#11
|
Quote:
Originally Posted by Bugsy
Good catch. I assume he's checked his logs. @Abhinash, do you see the below in logs?
"Load - Could not connect to SQL database. [%d] %s"
"Load Query failed. [%d] %s"
I recommend changing your CREATE to:
Code:
CREATE TABLE IF NOT EXISTS perfectzm (ID INT AUTO_INCREMENT PRIMARY KEY, steamid varchar(32) UNIQUE, name varchar(32), points INT(11), kills INT(11), deaths INT(11), score INT(11))
and then to INSERT or UPDATE, use this. You will never get a duplicate steam ID and it will always over-write the players existing data.
Code:
REPLACE INTO perfectzm (steamid, name, points, kills, deaths, score) VALUES ("STEAM:0:12345","bugsy",5,6,7,8)
|
Thanks Bugsy and sorry for late reply.
I will try that and let you know the result.
Last edited by Abhinash; 03-11-2021 at 19:48.
|
|
|
|