09.09.2013, 23:31
That depends on how you name your fields or columns, it could be `UserID` or `id` or to whatever. So if you have something like this:
Pretty simple, it'll select the field "username" from the accounts table where the UserID (or whatever the column is named) matches the variable. For your question, it checks if the value "%d" actually exists as a UserID in your database table.
pawn Code:
new string[128];
format(string, sizeof(string), "SELECT `username` FROM `accounts` WHERE `UserID`='%d'", variable);