SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 20/12/2016, 08:54 AM   #1
SkyFlare
Huge Clucker
 
SkyFlare's Avatar
 
Join Date: Apr 2015
Location: NZ
Posts: 221
Reputation: 43
Default MySQL R40 Updating, few problems...

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

Code:
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
Code:
mysql_store_result();
Here is 8490
Code:
if(mysql_num_rows())
Here is 8491
Code:
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?
__________________
Purchasable Scripting Services Available, Inbox me with your Requests.
My Project Progress Tracker
My Work
Link
Information
S-Store System V2 LinkIngame Store in Dialogs

Last edited by SkyFlare; 20/12/2016 at 07:52 PM.
SkyFlare is offline   Reply With Quote
Old 20/12/2016, 07:53 PM   #2
SkyFlare
Huge Clucker
 
SkyFlare's Avatar
 
Join Date: Apr 2015
Location: NZ
Posts: 221
Reputation: 43
Default Re: MySQL R40 Updating, few problems...

Instead of making a new Thread I am going to bump this, I still have not found my solution.
__________________
Purchasable Scripting Services Available, Inbox me with your Requests.
My Project Progress Tracker
My Work
Link
Information
S-Store System V2 LinkIngame Store in Dialogs
SkyFlare is offline   Reply With Quote
Old 20/12/2016, 07:53 PM   #3
BiosMarcel
Banned
 
Join Date: Jul 2012
Location: Germany
Posts: 1,219
Reputation: 234
Default Re: MySQL R40 Updating, few problems...

You are using non existant methods ... what do you expect, search for the new equivalents
BiosMarcel is offline   Reply With Quote
Old 20/12/2016, 07:56 PM   #4
SkyFlare
Huge Clucker
 
SkyFlare's Avatar
 
Join Date: Apr 2015
Location: NZ
Posts: 221
Reputation: 43
Default Re: MySQL R40 Updating, few problems...

Quote:
Originally Posted by [Bios]Marcel View Post
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.
__________________
Purchasable Scripting Services Available, Inbox me with your Requests.
My Project Progress Tracker
My Work
Link
Information
S-Store System V2 LinkIngame Store in Dialogs
SkyFlare is offline   Reply With Quote
Old 20/12/2016, 07:59 PM   #5
BiosMarcel
Banned
 
Join Date: Jul 2012
Location: Germany
Posts: 1,219
Reputation: 234
Default Re: MySQL R40 Updating, few problems...

Just look at your code try and guess what it is supposed to do and recode it in version R40 code
BiosMarcel is offline   Reply With Quote
Old 20/12/2016, 08:16 PM   #6
Konstantinos
Spam Machine
 
Konstantinos's Avatar
 
Join Date: Dec 2011
Posts: 11,827
Reputation: 1401
Default Re: MySQL R40 Updating, few problems...

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: http://wiki.sa-mp.com/wiki/MySQL/R40
Example script: https://raw.githubusercontent.com/pB...stem-cache.pwn
__________________
Life is like riding a bicycle. To keep your balance, you must keep moving.

[Tutorial] How to use SQLite
[FilterScript] Tune System
Konstantinos is offline   Reply With Quote
Old 21/12/2016, 01:00 AM   #7
SkyFlare
Huge Clucker
 
SkyFlare's Avatar
 
Join Date: Apr 2015
Location: NZ
Posts: 221
Reputation: 43
Default Re: MySQL R40 Updating, few problems...

Interesting, thanks for this Konstantinos.
__________________
Purchasable Scripting Services Available, Inbox me with your Requests.
My Project Progress Tracker
My Work
Link
Information
S-Store System V2 LinkIngame Store in Dialogs
SkyFlare is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating BlueG's mysql causes deleted functions to return problems Partner Scripting Help 0 01/11/2014 09:31 PM
Updating mysql please help me out! Seifspeed Scripting Help 5 01/09/2014 11:23 AM
Gates / Doors Problems since updating streamer plugin (picture included) AMEENAMEEN Scripting Help 11 29/03/2012 09:06 PM
account and updating problems HELP fast!!! -Rebel Son- Help Archive 2 24/03/2010 07:46 PM
Help With Updating Server and Joining Problems JohnnyM Server Support 1 20/07/2009 01:55 AM


All times are GMT. The time now is 08:20 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.