[HELP!] MySQL table doesn't exist - 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)
+--- Thread: [HELP!] MySQL table doesn't exist (
/showthread.php?tid=591774)
[HELP!] MySQL table doesn't exist -
vannesenn - 16.10.2015
Hi guys,
I made stats system(splitted into years and months with MySQL tables). But I have problem after server(automatic) creates tables for businessies(global stats is a one table with 12 rows). So, after server creates tables(on 1st of month or in OnGameModeInit() with MySQL check) then server need to load fields from created tables, but it calls an error. Error says that MySQL table doesn't exist, so I need to restart server because it can't load stuff.
Here's MySQL log
Here's a code for creating, loading and reseting stats(example for business stats)
After I start server, in OnGameMode() server will check is table created, if it's not server will create it with code I gave
Re: [HELP!] MySQL table doesn't exist -
SecretBoss - 16.10.2015
You probably connected the MySQL to wrong host
Re: [HELP!] MySQL table doesn't exist -
vannesenn - 16.10.2015
No, server is correctly connected with MySQL(localhost), I'm not sure where's a problem. After restart, it loads fields correctly
Re: [HELP!] MySQL table doesn't exist -
vannesenn - 16.10.2015
Anyone?
Re: [HELP!] MySQL table doesn't exist -
AndySedeyn - 16.10.2015
What MySQL library have you used to write this? I can see a few threaded queries in there and a few non-threaded. I am unsure why that is, please elaborate.
One remark: around line 36 (in pastebin) you wrote: "INSERT INTO ... (ID) VALUES ('%d') ... ", %d should not be in single-quotation marks since 'ID' is always a decimal value and will never be(come) a character.
Re: [HELP!] MySQL table doesn't exist -
vannesenn - 17.10.2015
Quote:
Originally Posted by AndySedeyn
What MySQL library have you used to write this? I can see a few threaded queries in there and a few non-threaded. I am unsure why that is, please elaborate.
One remark: around line 36 (in pastebin) you wrote: "INSERT INTO ... (ID) VALUES ('%d') ... ", %d should not be in single-quotation marks since 'ID' is always a decimal value and will never be(come) a character.
|
I'm not sure about single-quotation marks. I write everything in single-quotation into brackets for VALUES parameter
At what line are they((non)threaded queries)?
I use BlueG's plugin, last version.
Re: [HELP!] MySQL table doesn't exist -
vannesenn - 18.10.2015
None wants help?