AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how to check whether player's steamid is in database (https://forums.alliedmods.net/showthread.php?t=153411)

Jacob 03-23-2011 01:59

how to check whether player's steamid is in database
 
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 03-23-2011 03:32

Re: how to check whether player's steamid is in database
 
solved!

Exolent[jNr] 03-23-2011 20:19

Re: how to check whether player's steamid is in database
 
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.


All times are GMT -4. The time now is 14:36.

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