Page 1 of 1

MysQL database table isue

Posted: Sat Jan 11, 2020 3:58 am
by mactuan12
I have a slight problem that I cannot find reference to.

What I am able to do successfully:
- Connect to a database on a hosted GoDaddy server with two types of access (full and read-only).
- Disconnect from the database.

Okay, so that is less than impressive. When I try any query, I get the error that the table does not exist in the database. Using other database tools, I know exactly what the structure of my database is. Here is an example of my problem:

Any query on the table "account" returns an error that the table does not exist. What I cannot figure out is why the database name is being prepended to the database table name.

Any help would be greatly appreciated.

Re: MysQL database table isue

Posted: Sat Jan 11, 2020 10:58 am
by bogs
If I understand your post correctly, you already found the problem, i.e. -
the database name is being prepended to the database table name
That would certainly stop you from finding that particular table. The question really boils down to 'how are you getting the information to build the name'.

Unfortunately, you did not post any of the code you are using, so it is a bit more difficult to find that out, but it seems to me that you are probably submitting your query using variables filled in with the table name. While you are creating them, or when you are calling them, you have combined the two into one.

That is the only way I know of where a name would be pre-pended with another name.

Re: MysQL database table isue

Posted: Sat Jan 11, 2020 11:30 am
by Klaus
Hi mactuan12,

welcome to thew forum!

What Bogs said, we need more info about what you scripted so far.
And a little "Hello" or something would not have hurt for the very first posting.


Best

Klaus

Re: MysQL database table isue

Posted: Sat Jan 11, 2020 11:42 am
by SparkOut
On some hosting services (I have no experience with GoDaddy) the MySQL set up will generate a table prefix automatically when created. So it could be that you created the table with the name 'accounts' but it got the name 'mc_accounts' if the table prefix happened to be 'mc_' for instance. But that would not explain why you don't see the same results when looking at the db structure with other tools. So quite likely it is a script issue, as mentioned above. Can we see more please?

Also, how does this relate to MobGUI?

Re: MysQL database table isue

Posted: Sat Jan 11, 2020 11:55 am
by bogs
SparkOut wrote:
Sat Jan 11, 2020 11:42 am
Also, how does this relate to MobGUI?
I was wondering that myself, but had too many other wonders going on at the time. Klaus, may we have a table change please? :mrgreen:

Re: MysQL database table isue

Posted: Sat Jan 11, 2020 12:38 pm
by Klaus
Your fish is my kommand, Sire!