MySQL Inline


Šta je MySQL Inline?
To je jedna od mogućnosti koja dolazi uz y_inline koja Vam omogućava da u istoj funkciji bez kreiranja novih callbackova kreirate MySQL Cache.


Iz čega se MySQL Inline sastoji?
Sastoji se iz 2 funkcije:
MySQL_PQueryInline(MySQL:handle, Func:cb<>, const query[], GLOBAL_TAG_TYPES:...)
MySQL_TQueryInline(MySQL:handle, Func:cb<>, const query[], GLOBAL_TAG_TYPES:...)



Kako se MySQL Inline funkcije koriste?

// -> Database query
inline loadAccount()
{
    // Clear Chat Box
    ClearChat(playerid, 16);

    // Should we redirect user to registration?
    if(!cache_num_rows())
        return RegisterProcessHandler(playerid);

    cache_get_value_name_int(0, "account_id", PlayerDBID);
    cache_get_value_name(0, "account_password", PlayerPassword);
    cache_get_value_name(0, "account_mail", PlayerMail);
}
MySQL_TQueryInline(dbHandler, using inline loadAccount, "SELECT * FROM `player_account` WHERE `account_username` = '%e' LIMIT 1", PlayerUsername);