SA-MP Forums

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

Thread Tools Display Modes
Old 19/03/2011, 02:18 PM   #1
Little Clucker
Join Date: Jul 2010
Posts: 22
Reputation: 0
Default mysql -saving

Hey guys,
i have a little problem with my sql-system.
It works pretty fine, but my user-name wont be save.
That is my big problem.
Here is some code:
pawn Code:
        new pName[MAX_PLAYER_NAME],query[300];
        GetPlayerName(playerid, pName, sizeof(pName));
        cvar[playerid] = 1;
        format(query, sizeof(query), "INSERT INTO samp_accounts (pKey,pName,cvar) VALUES ('%s','%s',%d)", password, pName,cvar[playerid]);
The query looks alright. My name is right in the "printf" output.
The database structure should be also alright, because, the key will be saved rightly.
Jony_King is offline  
Old 19/03/2011, 02:21 PM   #2
JaTochNietDan's Avatar
Join Date: Apr 2007
Location: Republic of Ireland
Posts: 2,502
Reputation: 363
Default Re: mysql -saving

Can you show what the print says?

Also why are you using mysql_free_result when you haven't stored anything?

Additionally I suggest you enable MySQL logging, then you will be able to see if there is an error with the query in a new file called mysql_log.txt which is created when you enable logging.
[Includes]: [jBan] | [jBanLite]
[Plugins]: [FileManager] | [Execute]
[Applications]: [Remote Administrator *NEW] | [Script King] | [RCON GUI]
JaTochNietDan is offline  

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
help with mysql saving WardenCS Help Archive 4 26/02/2011 08:34 AM
Help with MySQL saving. Grazor Help Archive 0 18/02/2011 02:22 PM
MySql Saving IP? BurrodaZero Help Archive 0 22/05/2010 01:22 PM
MySQL Saving ON gmx jamesb93 Help Archive 0 17/11/2009 06:11 PM

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

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