Quote:
Originally Posted by mike_1
Thanks a lot for your helpful response but is it possible to make it without calling any function?
For example something like:
pawn Код:
new query[256]; format(query, sizeof(query), "SELECT field1, field2, field3 FROM table WHERE field4='Whatever'"); mysql_tquery(connectionHandle, query); //send the threaded query and load the results in the LoadData function, that has no parameters new rows, fields; cache_get_data(rows, fields, connectionHandle); //number of rows and fields //we could have used rows = cache_num_rows(); too if(rows) //if we found at least one result { for(new i = 0; i < rows; i++) //looping through all the results { new field1, Float:field2, field3[16]; //we got one int, one float and one char field1 = cache_get_row_int(i, 0, connectionHandle); field2 = cache_get_row_float(i, 1, connectionHandle); cache_get_row(i, 2, field3, connectionHandle, sizeof(field3)); //go ahead and use the variables however you want } } else { //no results }
|
I believe this is what you are trying to achieve.
https://sampforum.blast.hk/showthread.php?tid=548986
With inline you can have a function within a function. The tutorial above will show you how.