SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 17/04/2012, 07:38 PM   #1
Nuke547
Big Clucker
 
Join Date: Dec 2011
Posts: 172
Reputation: 16
Default Small MYSQL updating not working?

Fixed.

Last edited by Nuke547; 17/04/2012 at 09:42 PM.
Nuke547 is offline   Reply With Quote
Old 17/04/2012, 08:02 PM   #2
Nuke547
Big Clucker
 
Join Date: Dec 2011
Posts: 172
Reputation: 16
Default Re: Small MYSQL updating not working?

Updated.
Nuke547 is offline   Reply With Quote
Old 17/04/2012, 08:04 PM   #3
MP2
Godfather
 
MP2's Avatar
 
Join Date: Jan 2011
Location: England
Posts: 6,416
Reputation: 973
Default Re: Small MYSQL updating not working?

Please do not bump within 24 hours.

As for your code - debug it with print(f) to see what is getting called, and check your mysql_log.
MP2 is offline   Reply With Quote
Old 17/04/2012, 08:07 PM   #4
Nuke547
Big Clucker
 
Join Date: Dec 2011
Posts: 172
Reputation: 16
Default Re: Small MYSQL updating not working?

Quote:
Originally Posted by MP2 View Post
Please do not bump within 24 hours.

As for your code - debug it with print(f) to see what is getting called, and check your mysql_log.
Sorry about the bump. Didn't mean it like that. I don't have a mysql_log, and what do you want me to put with the print(f)?
Nuke547 is offline   Reply With Quote
Old 17/04/2012, 08:10 PM   #5
PrawkC
Huge Clucker
 
Join Date: May 2011
Posts: 497
Reputation: 52
Default Re: Small MYSQL updating not working?

Enable debug for MySQL, for BlueG's plugin its mysql_debug(true);
PrawkC is offline   Reply With Quote
Old 17/04/2012, 08:10 PM   #6
Skribblez
Huge Clucker
 
Join Date: Mar 2012
Posts: 321
Reputation: 13
Default Re: Small MYSQL updating not working?

Add mysql_debug(1); under OnGameModeInit, this will automatically log everything especially on queries and save it into a text file(Debug.txt) and you'll see what's wrong with your code.
__________________

In the end, it's just imagination that sets the limit.
Man is least himself when he talks in his own person. Give him a mask, and he will tell you the truth.
Skribblez is offline   Reply With Quote
Old 17/04/2012, 08:18 PM   #7
Nuke547
Big Clucker
 
Join Date: Dec 2011
Posts: 172
Reputation: 16
Default Re: Small MYSQL updating not working?

Here is the error it states.

pawn Code:
Query(UPDATE accounts SET group = 1 WHERE name = 'Billy_Bob') - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group = 1 WHERE name = 'Billy_Bob'' at line 1)
Nuke547 is offline   Reply With Quote
Old 17/04/2012, 09:38 PM   #8
kikito
Guest
 
Posts: n/a
Default Re: Small MYSQL updating not working?

pawn Code:
format(query, sizeof(query), "UPDATE `accounts` SET group = '%d' WHERE name = '%s'", value, GetName(playerid));
That's it (:
  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
MYSQL not updating? Nuke547 Scripting Help 3 17/04/2012 01:43 AM
MySql Not Updating aqu Scripting Help 0 26/02/2012 02:46 PM
Updating a mysql row ihatetn931 Help Archive 0 24/11/2010 11:53 AM
Updating Car [Mysql] Cameltoe Help Archive 10 14/08/2010 09:56 PM


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


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