Raised This Month: $114 Target: $400
 28% 

SQL Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Abhinash
Senior Member
Join Date: Jan 2015
Location: India,kolkata
Old 03-11-2021 , 19:48   Re: SQL Problem
Reply With Quote #11

Quote:
Originally Posted by Bugsy View Post
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.
Abhinash is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:30.


Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode