MySQL R39 (+reps) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL R39 (+reps) (
/showthread.php?tid=538240)
MySQL R39 (+reps) -
Baltimore - 20.09.2014
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)
Re: MySQL R39 (+reps) -
Vince - 20.09.2014
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.
Re: MySQL R39 (+reps) -
Baltimore - 20.09.2014
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;
}
}
Re: MySQL R39 (+reps) -
Ox1gEN - 20.09.2014
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.
Re: MySQL R39 (+reps) -
Stinged - 20.09.2014
Did you read what Vince told you?
The use of functions change.
Re: MySQL R39 (+reps) -
Baltimore - 20.09.2014
https://sampforum.blast.hk/showthread.php?tid=538304
Re: MySQL R39 (+reps) -
Baltimore - 21.09.2014
MySQL R5 there function mysql_fetch_row
MySQL R39 what replaces the function above?
Re: MySQL R39 (+reps) -
Ox1gEN - 22.09.2014
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.