SA-MP Forums Archive
[HELP] Mysql is not working - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Mysql is not working (/showthread.php?tid=203552)



[HELP] Mysql is not working - Himynameis - 27.12.2010

Yo guys,

I've set up a mysql database on my server which I bought (so not my localhost server or w/e).
I can run the script and when I check my log it says that my script is connected to the mysql DB.

But when I log out or what ever, my variables don't afe (and yes, they are supposed to safe).

Here's an image of my table and field:



As you can see the table name is Accounts the fields are set up good.

What the problem?


Re: [HELP] Mysql is not working - Kaylux - 27.12.2010

Show your mysql log.


Re: [HELP] Mysql is not working - Himynameis - 27.12.2010

Where can I find this?
Because I was speaking about the normal server log.
When the script makes contact with the server I made a print with connected etc.


Re: [HELP] Mysql is not working - Niixie - 27.12.2010

Well, adminlevel, money and bank etc. is varchar(11) which means that they are strings, you need to make them who contains numbers to intergers.


Re: [HELP] Mysql is not working - Luis- - 27.12.2010

It is were your serve_log.txt is


Re: [HELP] Mysql is not working - Himynameis - 27.12.2010

But why doesn't Name save?
It's a string and it's set as varchar?


Re: [HELP] Mysql is not working - Himynameis - 27.12.2010

Found the mysql log but it's huge, do you need specific parts or do you want me to put it all in a pastebin?


Re: [HELP] Mysql is not working - Niixie - 27.12.2010

give us the 20 last lines
- Give us a part from your script aswell where it saves the name


Re: [HELP] Mysql is not working - Himynameis - 27.12.2010

http://pastebin.com/1xt7rLGM

Last 20 lines and the adding function.


Re: [HELP] Mysql is not working - Himynameis - 27.12.2010

Sorry for the double post but I found out that some tables were not yet made.
I made them now but it still doesn't work.
For every table it says : Successfully executed. But the variables still don't safe.
But I don't get it; I got a DB and all, but where do these things safe?
In dini for example you'd have:
Userfiles/NAME and in NAME you have the variables, now I have MYSQL_DB/Accounts/name and MYSQL_DB/Accounts/Rank and MYSQL_DB/Accounts/Faction etc. How does the script/server or what ever know what variable belongs to who? I mean, this for example:
Quote:

(UPDATE drugs SET Cocaine=0,Crack=0,Heroin=0,Hydrocodone=0,Inhalants =0,LSD=0,Marijuana=0,MDMA=0,Methamphetamine=0,Anab olic_Steroids=0,Needles=0,Blunts=0 WHERE Name = 'Chris Loyd') - Successfully executed.

It's saving in Name = Chris Loyd? But the table is drugs?

Anyways this is the 20 last lines I got now:
http://pastebin.com/ST5f8g8t