[HELP!] MySQL table doesn't exist
#1

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
Reply
#2

You probably connected the MySQL to wrong host
Reply
#3

No, server is correctly connected with MySQL(localhost), I'm not sure where's a problem. After restart, it loads fields correctly
Reply
#4

Anyone?
Reply
#5

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.
Reply
#6

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.
Reply
#7

None wants help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)