MySQL query
#1

Hello, could somebody help me with query.

I want the query to look like this
Код:
SELECT * FROM table WHERE row LIKE '%%s%'
But this code is not working, how should I change it to work?
Reply
#2

Код:
mysql_format(handle, query, sizeof(query), "SELECT * FROM `table` WHERE `row` LIKE '##%e##'", ... ...);
mysql_query(handle, strreplace("##", "%", query));
Something like that?
Reply
#3

Can't get this working
Reply
#4

Код:
'%%%s%%'
Reply
#5

Thanks, Vince. It's working! One more question, I want all the result to show on dialog list
Код:
while(mysql_retrieve_row())
    		{
    		    new name[32];
    		    mysql_get_field("user", result);
		     	myStrcpy(name, result);
				format(string,sizeof(string), "%s", name);
				SendClientMessage(playerid, COLOR_RED, string);
    		}
This one is working, but don't know how to put it in dialog list

P.S: Got it working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)