Raised This Month: $ Target: $400
 0% 

how to check whether player's steamid is in database


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Jacob
Senior Member
Join Date: Oct 2010
Old 03-23-2011 , 01:59   how to check whether player's steamid is in database
Reply With Quote #1

when a player put in server,how to check whether his steamid is in a mysql table such as table `data`.if not, send him a message"you are new here"
Thank you in advance!
Jacob is offline
Jacob
Senior Member
Join Date: Oct 2010
Old 03-23-2011 , 03:32   Re: how to check whether player's steamid is in database
Reply With Quote #2

solved!
Jacob is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-23-2011 , 20:19   Re: how to check whether player's steamid is in database
Reply With Quote #3

SELECT steamid FROM table WHERE steamid = '%s';
- %s is the player's SteamID

If SQL_NumResults() = 0, Then
- Display message
- INSERT INTO table (steamid) VALUES ('%s');

Just for people who would like to know the solution.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Reply



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 14:36.


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