MySQL R40 Updating, few problems...
#1

Hi guys, I am trying to update MYSQL to R40+
mostly done but just this small bit left.

Код:
gamemodes\SRP.pwn(8489) : error 017: undefined symbol "mysql_store_result"
gamemodes\SRP.pwn(8490) : error 017: undefined symbol "mysql_num_rows"
gamemodes\SRP.pwn(8491) : error 017: undefined symbol "mysql_fetch_row_format"
Here is 8489
Код:
mysql_store_result();
Here is 8490
Код:
if(mysql_num_rows())
Here is 8491
Код:
if(mysql_fetch_row_format(query,"|"))
I checked a few tutorials on updating to R40 but it just didn't do any justice.

I am pretty sure this is something small.
I am very unfamiliar with MySQL and still learning, so please don't laugh too hard at my mistakes lol.
Anyone able to push me in the right direction here please?
Reply
#2

Instead of making a new Thread I am going to bump this, I still have not found my solution.
Reply
#3

You are using non existant methods ... what do you expect, search for the new equivalents
Reply
#4

Quote:
Originally Posted by [Bios]Marcel
Посмотреть сообщение
You are using non existant methods ... what do you expect, search for the new equivalents
Of course it is non existent methods, although I have been searching, I couldn't even find documentation for these methods.
Reply
#5

Just look at your code try and guess what it is supposed to do and recode it in version R40 code
Reply
#6

What I can advise you is to learn how to use R40+ first (get familiar with its functions) and when the time will come to convert your code will be piece of cake.

mysql_store_result is somewhat similar to saving the cache-id (what mysql_query returns) but don't! Use threaded queries instead (look in wiki for mysql_tquery).

mysql_num_rows -> cache_num_rows

mysql_fetch_row_format is nothing to be compared with. Assuming you'd use sscanf to fetch the result, here you use cache_get_value/cache_get_value_int/cache_get_value_float functions to retrieve the data from the columns.

MySQL Wiki: https://sampwiki.blast.hk/wiki/MySQL/R40
Example script: https://raw.githubusercontent.com/pB...stem-cache.pwn
Reply
#7

Interesting, thanks for this Konstantinos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)