A_mysql not loading properly
#1

So after the patch from last night, I updated the binary
to the patch so that I am up to date, but i tried to debug the script but all I kept getting was

These errors started to happen after I updated to the patch and didn't show before. I do not know if it my a_mysql.inc or anything but if it isn't and you have a solution,
please reply it would be much appreciated.
Reply
#2

pawn Код:
new query[128], mysql_ping[128];
Reply
#3

Nope, ive looked into the actual .inc file and mysql_ping just doesn't exist :/
Reply
#4

It's about not having just the right version of MySQL plugin. I'd suggesting using BlueG's R5 MySQL plugin + include. Can't link to it because I am from phone.
Reply
#5

R6 should work fine too. AFAIK the changes were made in R7 and higher.
Here's the thread, just download the R6 files I guess..
Reply
#6

Quote:
Originally Posted by Jstylezzz
Посмотреть сообщение
R6 should work fine too. AFAIK the changes were made in R7 and higher.
Here's the thread, just download the R6 files I guess..
Yeah, I just tested what i had and I had R7 for some reason :/ thanks anyway
Reply
#7

I assume you're using mysql_ping() to retrieve the server connection, that being true/false.

I also assume you're using R7 and above, therefore I have made a piece of code:

pawn Код:
new handle = -1; // at top of script somewhere, before OnGameModeInit

OnGameModeInit(playerid)
{
    handle = mysql_connect("hn", "un", "db", "pw");
   
    if(handle)
    {
        print("[MYSQL] Connection Successful.");
    }
    else
    {
        print("[MYSQL] Connection Unsuccessful.");
    }
   
    //rest of OnGameModeInit code here
}
Queries are threaded, meaning you'd do them like this(R7 -> R30 something)
mysql_function_query(connectionHandle, query[], bool:cache, callback[], format[], {Float,_}:..);

As of R33 or something they're like this:
mysql_tquery(...);

Or use the new ORM(object Relational Mapping) system, but there are tutorials for that.

EDIT #1:

Stay with R7! It's not too different and the speed difference is quite amazing. It's a ton better dude and easier to understand. But if you'd like to stay with R6-2 then feel free
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)