[Plugin] [REL] SA:MP MySQL Plugin 2.1.1 - Released (1/25/2011

How is easyst way to compile 1.4 to 2.0?
Reply

[Fri Sep 10 22:32:03 2010] Error (0): Function: mysql_connect failed, mysql was not initialized on this handle.

What is the false thing?
Reply

I have a problem and its after like one or more hours that my gamemode is fine but after i think it disconnect from mySQL because when i go ingame and try to login at my account which is already registered in the database it says this name isnt took and show me register and when i register it still comes means it doesnt save even
thanks to help me
Reply

Quote:
Originally Posted by [Ask]Terminator
Посмотреть сообщение
I have a problem and its after like one or more hours that my gamemode is fine but after i think it disconnect from mySQL because when i go ingame and try to login at my account which is already registered in the database it says this name isnt took and show me register and when i register it still comes means it doesnt save even
thanks to help me
Also is having this problem @ Debian
Reply

Quote:
Originally Posted by [Ask]Terminator
Посмотреть сообщение
still no answer
Thats either probably because your mysql database is turning on/off at periods. If its localhosted, it shouldn't be doing that, and it would be more of a function inside you script.

If it isn't local hosted, and you have a company hosting your db, try contacting them on it.
Reply

I tried db4 and also a local hosted and i still get that problem.
is there a funtion to reconnect to mysql after its disconneted or something?
Reply

Quote:
Originally Posted by The Toni
Посмотреть сообщение
Thats either probably because your mysql database is turning on/off at periods. If its localhosted, it shouldn't be doing that, and it would be more of a function inside you script.

If it isn't local hosted, and you have a company hosting your db, try contacting them on it.
i'm Also having this problem and the problem is caused if theres no activity on the server .. as my server is passworded i don't get much activity.
Reply

mine is somehow same
exactly after i dont get activity on it
Reply

Quote:
Originally Posted by The Toni
View Post
'WHERE `userid1 = '0''.
Unnecessary quote marks.
Change that query to this;
Code:
WHERE `userid` = 0 (or any % module).
Only use ' and ' for strings.
Okay, thank you. I have changed it to this;

pawn Code:
format(string, sizeof(string), "UPDATE `Accounts` SET `Password` = '%s', `AdminLevel` = '%d', `Money` = '%d', `Score` = '%d', WHERE `UserID` = %d", PlayerStatistics[playerid][pPassword], PlayerStatistics[playerid][pAdminLevel], PlayerStatistics[playerid][pMoney], PlayerStatistics[playerid][pDatabaseID]);
However I still get the same error.
Reply

Quote:
Originally Posted by RealCop228
View Post
Okay, thank you. I have changed it to this;

pawn Code:
format(string, sizeof(string), "UPDATE `Accounts` SET `Password` = '%s', `AdminLevel` = '%d', `Money` = '%d', `Score` = '%d', WHERE `UserID` = %d", PlayerStatistics[playerid][pPassword], PlayerStatistics[playerid][pAdminLevel], PlayerStatistics[playerid][pMoney], PlayerStatistics[playerid][pDatabaseID]);
However I still get the same error.
pawn Code:
`AdminLevel` = %d, `Money` = %d, `Score` = %d
You added ' and ' around integers again.

Plus, you also added a extra comma before "WHERE `userid` = %d".
Reply

Is this better than G-Stylezzz's Plugin?
Reply

Yes IMO.

The message you have entered is too short. Please lengthen your message to at least 8 characters.
Reply

Quote:
Originally Posted by The Toni
View Post
pawn Code:
`AdminLevel` = %d, `Money` = %d, `Score` = %d
You added ' and ' around integers again.

Plus, you also added a extra comma before "WHERE `userid` = %d".
Oh! That definitely fixed the issue! Just to be on the safe side, what about here?

pawn Code:
"SELECT * FROM `Accounts` WHERE `UserID` = '%d'"
Should I do anything there, or just leave it?
Reply

"SELECT * FROM Accounts WHERE UserID = %d"
' ' only for strings like '%s'
Reply

It shouldn't matter.
Reply

Luka P don't think so. Try make query with keys - time, date, type, you get the error if your keys not in double `.
Reply

Someone else noticed OnMysqlQuery isn't working?

The actual callback gets called, and you can make a switch statement .. but when you call mysql_store_result(); inside the statement nothing gets done, why?
Reply

DA_Boss unstable mysql version?
Reply

Re-download the fix and try again

EDIT: it might be because I had to compile it with visual studio 2010, which is a piece of shit.
I don't understand why Microsoft doesn't have downloads for previous versions of vs.
Reply

Thats just SP1, but I found the whole download on brothersoft

Ill uninstall 2010 and install 2008
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)