SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 15/09/2010, 12:38 AM   #511
Scenario
Godfather
 
Scenario's Avatar
 
Join Date: Feb 2010
Location: Heaven
Posts: 7,801
Reputation: 701
Default Re: [REL] SA:MP MySQL Plugin 2.0 - Released (8/7/2010)

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.
Scenario is offline   Reply With Quote
Old 15/09/2010, 02:23 AM   #512
Toni
High-roller
 
Toni's Avatar
 
Join Date: Aug 2009
Location: United States
Posts: 1,464
Reputation: 162
Default Re: [REL] SA:MP MySQL Plugin 2.0 - Released (8/7/2010)

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".
__________________
Toni is offline   Reply With Quote
Old 15/09/2010, 08:48 AM   #513
Peppe95
Little Clucker
 
Join Date: Sep 2009
Posts: 28
Reputation: 0
Default Re : [REL] SA:MP MySQL Plugin 2.0 - Released (8/7/2010)

Is this better than G-Stylezzz's Plugin?
__________________
My scripts:

BasketBall Filterscript - http://forum.sa-mp.com/showthread.php?t=130640
FairPlay AntiCheat - http://forum.sa-mp.com/showthread.php?t=130755
HeadShot System - http://forum.sa-mp.com/showthread.php?p=802102
Peppe95 is offline   Reply With Quote
Old 15/09/2010, 11:51 AM   #514
Luka P.
High-roller
 
Join Date: Feb 2009
Posts: 1,428
Reputation: 13
Default Re: [REL] SA:MP MySQL Plugin 2.0 - Released (8/7/2010)

Yes IMO.

The message you have entered is too short. Please lengthen your message to at least 8 characters.
Luka P. is offline   Reply With Quote
Old 15/09/2010, 01:17 PM   #515
Scenario
Godfather
 
Scenario's Avatar
 
Join Date: Feb 2010
Location: Heaven
Posts: 7,801
Reputation: 701
Default Re: [REL] SA:MP MySQL Plugin 2.0 - Released (8/7/2010)

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?
Scenario is offline   Reply With Quote
Old 15/09/2010, 01:18 PM   #516
toneysix
Huge Clucker
 
Join Date: Sep 2009
Posts: 262
Reputation: 0
Default Re: [REL] SA:MP MySQL Plugin 2.0 - Released (8/7/2010)

"SELECT * FROM Accounts WHERE UserID = %d"
' ' only for strings like '%s'
toneysix is offline   Reply With Quote
Old 15/09/2010, 03:02 PM   #517
Luka P.
High-roller
 
Join Date: Feb 2009
Posts: 1,428
Reputation: 13
Default Re: [REL] SA:MP MySQL Plugin 2.0 - Released (8/7/2010)

It shouldn't matter.
Luka P. is offline   Reply With Quote
Old 16/09/2010, 12:21 AM   #518
toneysix
Huge Clucker
 
Join Date: Sep 2009
Posts: 262
Reputation: 0
Default Re: [REL] SA:MP MySQL Plugin 2.0 - Released (8/7/2010)

Luka P don't think so. Try make query with keys - time, date, type, you get the error if your keys not in double `.
toneysix is offline   Reply With Quote
Old 16/09/2010, 06:51 AM   #519
Cameltoe
High-roller
 
Cameltoe's Avatar
 
Join Date: Apr 2010
Location: Norway
Posts: 1,741
Reputation: 24
Default Re: [REL] SA:MP MySQL Plugin 2.0 - Released (8/7/2010)

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?
__________________

Quote:
Originally Posted by Cameltoe View Post
Share the progress so others who are looking for the same also find's their answer.
Quote:
Originally Posted by teomakedonija View Post
ahaha i don't want
Rep++;
Cameltoe is offline   Reply With Quote
Old 17/09/2010, 03:59 AM   #520
whitedragon
Gangsta
 
Join Date: Sep 2009
Posts: 516
Reputation: 2
Default Re: [REL] SA:MP MySQL Plugin 2.0 - Released (8/7/2010)

DA_Boss unstable mysql version?
whitedragon 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
[Plugin] [REL] MySQL Plugin (Now on github!) BlueG Plugin Development 6158 11/04/2020 08:51 AM
Best MySQL Plugin? Antonio [G-RP] Help Archive 3 10/01/2011 01:31 AM
Best MySQL plugin? DRIFT_HUNTER Help Archive 2 07/12/2010 03:43 PM
Which MySQL plugin? Whois. Help Archive 0 07/04/2010 11:55 AM
Mysql Plugin Help Jbosh123 Help Archive 0 04/09/2009 11:35 AM


All times are GMT. The time now is 02:13 PM.


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