30.07.2015, 20:41
Hello, I need help using dialogs and mysql maybe somebody can help me
I have dialog that displays names from the mysql
In next dialog I want to show data from selected name but I don't know how to select the data from mysql
For example, in this first dialog I have list
- User1
- User2
When I select one of them I want to select data like
SELECT * FROM players WHERE user = 'User1 or User2'
But I don't know what to write in User 1 or User2 place
I have dialog that displays names from the mysql
Код:
while(mysql_retrieve_row()) { new name[32]; mysql_get_field("user", result); myStrcpy(name, result); str_replace(name, '_', ' '); format(iString,sizeof(iString),""COL_WHITE"- %s\n", name); strcat(string,iString); } ShowPlayerDialog(playerid, 1005, DIALOG_STYLE_LIST, "Matches found", string, "Select", ""); }
For example, in this first dialog I have list
- User1
- User2
When I select one of them I want to select data like
SELECT * FROM players WHERE user = 'User1 or User2'
But I don't know what to write in User 1 or User2 place