Upgrading BluG's MySQL r33 plugin to R40+
#2

These functions belong to R5 and R6 versions.

mysql_num_rows -> cache_num_rows() macro or cache_get_row_count function
mysql_free_result -> cache_delete but only if you store the cache (non-threaded queries)
mysql_fetch_row -> fetches row from result set and also moves row pointer. We do not split result anymore and use a loop to access each row.
mysql_real_escape_string -> mysql_escape_string or '%e' specifier in mysql_format function
mysql_store_result -> cache_save (only used if you want to access the result after a while and not directly)
mysql_retrieve_row -> moves to the next row, use a loop.
mysql_fetch_field_row -> fetches data by column name, use cache_get_value macro only for string. If the data are integers or floating-point numbers, use cache_get_value_int or cache_get_value_float respectively.

Use threaded queries and take a look at wiki for examples or description of each function: https://sampwiki.blast.hk/wiki/MySQL/R40
Reply


Messages In This Thread
Upgrading BluG's MySQL r33 plugin to R40+ - by StRaffael - 19.10.2018, 17:25
Re: Upgrading BluG's MySQL r33 plugin to R40+ - by Calisthenics - 19.10.2018, 17:40
Re: Upgrading BluG's MySQL r33 plugin to R40+ - by StRaffael - 19.10.2018, 18:16
Re: Upgrading BluG's MySQL r33 plugin to R40+ - by Calisthenics - 19.10.2018, 18:50
Re: Upgrading BluG's MySQL r33 plugin to R40+ - by StRaffael - 19.10.2018, 19:48
Re: Upgrading BluG's MySQL r33 plugin to R40+ - by Calisthenics - 19.10.2018, 19:58

Forum Jump:


Users browsing this thread: 1 Guest(s)