Help with SQL querry
Sorry for my bad English.
In my game servers admins in the AMXBans database identified by SteamID. In the Nickname field identifies the real nicknames of admins. When an admin ban player in the database is stored admin nick from game, not a real nickname. I need to admin real nickname taken from a database. From cmdban.inl -> Quote:
Quote:
How to make correctly request in database? |
Re: Help with SQL querry
I think you want something like this:
Code: format(query,1023,"SELECT nickname FROM amx_amxadmins WHERE username='%s'",admin_nick) or this: Code:
Also, make sure you escape the player's name before formatting or you could end up with a nasty injection exploit. |
Re: Help with SQL querry
Quote:
But this command does not perform query to the database, it only formats (preparing) the request. How do the query? |
Re: Help with SQL querry
|
Re: Help with SQL querry
HAWK HAI!!
And hawk, hai:D and you shouldn't need blah.field it should be assumed... |
Re: Help with SQL querry
Quote:
Thank you very much! That's exactly what I need! |
| All times are GMT -4. The time now is 01:48. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.