Help to convert one line from SQLite to MySQL
#1

PHP Code:
    if(db_num_rows(queryresult) == MAX_HOUSES_PER_PLAYER) return SendClientMessage(playerid0xFF0000"You already have the max amount of houses"); 
How this line could be converted in MySQL?
Reply
#2

https://sampwiki.blast.hk/wiki/MySQL/R33#cache_get_data

using it in a threaded queries, but first define variables of rows and fields to use them in the function, and then the rows variable will hold the number of rows of the threaded-query.
you can use it in the callback you call in mysql_tquery function.
Reply
#3

PHP Code:
new rowsfields;
cache_get_data(rowsfields); 
I know this function. Should i use it something like this?
PHP Code:
if(rows == MAX_PLAYER_PER_HOUSE 
Reply
#4

exactly, but as i have told you, you have to use it in the callback that the function mysql_tquery called to store the query results in using cache_get_data
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)