[Tutorial] Creating MySQL Database Tables (Text Editor)
#5

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:
pawn Code:
new string[128];
format(string, sizeof(string), "SELECT `username` FROM `accounts` WHERE `UserID`='%d'", variable);
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.
Reply


Messages In This Thread
Creating MySQL Database Tables (Text Editor) - by Eyce - 09.09.2013, 04:10
Re: Creating MySQL Database Tables (Text Editor) - by Luis- - 09.09.2013, 06:44
Re: Creating MySQL Database Tables (Text Editor) - by Eyce - 09.09.2013, 16:17
Re: Creating MySQL Database Tables (Text Editor) - by MaxPierce - 09.09.2013, 21:08
Re: Creating MySQL Database Tables (Text Editor) - by Eyce - 09.09.2013, 23:31
Re: Creating MySQL Database Tables (Text Editor) - by Schocc - 09.09.2013, 23:37
Re: Creating MySQL Database Tables (Text Editor) - by PT - 10.09.2013, 02:53
Re: Creating MySQL Database Tables (Text Editor) - by Eyce - 10.09.2013, 09:00
Re: Creating MySQL Database Tables (Text Editor) - by Tuff - 10.09.2013, 09:01
Re: Creating MySQL Database Tables (Text Editor) - by Eyce - 10.04.2016, 21:23

Forum Jump:


Users browsing this thread: 1 Guest(s)