MySQL R39 (+reps)
#1

Hello

I currently use MySQL R5 for my gamemode.

I want to go under MySQL R39.

However I do not know anything about MySQL R39, so is it possible to get a list of functions that match MySQL R5 to MySQL R39 or something similar?

Thx

(+reps for those who help me)
Reply
#2

You cannot upgrade one-to-one by replacing functions. You will need to restructure your entire script to make use of the threaded queries. You can read AndreT's tutorial to get an idea on how that works.
Reply
#3

How convert this code to MySQL R39?:

pawn Код:
public CheckAccount(sqlplayersname[])
{
    new query[128];
    new escstr[MAX_PLAYER_NAME];
    mysql_real_escape_string(sqlplayersname, escstr);
    format(query, sizeof(query), "SELECT id FROM srp_players_stats WHERE LOWER(Name) = LOWER('%s') LIMIT 1", escstr);
    MySQLCheckConnection();
    mysql_query(query);
    mysql_store_result();
    if (mysql_num_rows() == 0)
    {
        mysql_free_result();
        return 0;
    }
    else
    {
        new strid[32];
        new intid;
        mysql_fetch_row(strid);
        intid = strval(strid);
        mysql_free_result();
        return intid;
    }
}
Reply
#4

Vince is a PRO scripter.
If he says you can't upgrade one-by-one by replacing functions to use threaded queries.

He's probably right.
Reply
#5

Did you read what Vince told you?
The use of functions change.
Reply
#6

https://sampforum.blast.hk/showthread.php?tid=538304
Reply
#7

MySQL R5 there function mysql_fetch_row

MySQL R39 what replaces the function above?
Reply
#8

Search for cache functions.

1 - fetching a string with cache - cache_get_field_content(row, "name", variable to store it in, sizeof variable to store it in).

2 - fetching an integer with cache - VARIABLE = cache_get_field_content_int(row, "name");

3 - fetching a float with cache - same as integer one, just replace int with float.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)