Help with dialog and mysql - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help with dialog and mysql (
/showthread.php?tid=583759)
Help with dialog and mysql -
Yako - 30.07.2015
Hello, I need help using dialogs and mysql maybe somebody can help me
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", "");
}
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