MySQL Rows in Dialog List
#1

How would it be possible to list each row in a mysql query as a menu option in a DIALOG_STYLE_LIST? I can list them in SendClientMessage using sscanf but I can't figure out how to list rows/results in a dialog because in the dialog it all needs to be in one string. Any suggestions/examples? I've tried searching the forums, can't really find any info.

Thanks for your help.
Reply
#2

You can do sth like this:
pawn Код:
new str[128]; //you have to check how big you need it
for(new i=0; i<ROW_COUNT; i++){
strcat(str, ROW_VALUE);
strcat(str, "\n");
NEXT ROW;
}
Just the pseudocode, you need to add the correct functions. But this is how I would do it.
Reply
#3

Thanks, I'll play around with it and see what I can do. +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)