About MYSQL
#6

I would not. Stop dwelling in the past.

pawn Код:
new query[128];
mysql_format(connection, query, sizeof(query), "SELECT accountid FROM ... WHERE ...", variables);
mysql_tquery(connection, query, "MyCallback", "d", playerid);

// ---

forward MyCallback(playerid);

public MyCallback(playerid)
{
    if(cache_get_row_count(connection))
    {
        new accountid = cache_get_row_int(0, 0, connection); // row 0, column 0
    }
}
That is the very basic structure you'll need. You can use cache_get_field_content_int to fetch the result by name if you so desire, but it is faster to load it by its numeric position in the result.
Reply


Messages In This Thread
About MYSQL - by Fel486 - 22.11.2014, 17:16
AW: About MYSQL - by Mellnik - 22.11.2014, 17:43
Re: About MYSQL - by Fel486 - 22.11.2014, 17:50
Re: About MYSQL - by Fel486 - 22.11.2014, 18:34
Re: About MYSQL - by ikey07 - 22.11.2014, 18:54
Re: About MYSQL - by Vince - 22.11.2014, 19:06
Re: About MYSQL - by Fel486 - 22.11.2014, 23:25

Forum Jump:


Users browsing this thread: 1 Guest(s)