MySQL Database Table Issue

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
edljr
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 56
Joined: Sun Oct 26, 2008 6:47 am
Contact:

MySQL Database Table Issue

Post by edljr » Tue Jun 21, 2011 4:09 am

Hi,

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:

Example Database Name: thename
Example Table Name: account

Any query on the table "account" returns an error that the table "thename.account" 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.

Thanks,
Ed

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: MySQL Database Table Issue

Post by bangkok » Tue Jun 21, 2011 6:10 am

edljr wrote: Any query on the table "account" returns an error that the table "thename.account" does not exist. What I cannot figure out is why the database name is being prepended to the database table name.
Ed
Are you sure that the connexion is successfull ? If you can't make any query, how do you know you if the connexion is "full" or "read" only ?

You should show us the script you use for the connexion, and the script for the query.

SparkOut
Posts: 2943
Joined: Sun Sep 23, 2007 4:58 pm

Re: MySQL Database Table Issue

Post by SparkOut » Tue Jun 21, 2011 9:28 am

A few thoughts...
1) like bangkok, I wonder if you are actually getting a genuine connection. This sounds like you're accessing the DB via a remote connection, so is the "Allow Direct Database Access" option enabled?
2) I can also believe you have a valid connection. I am assuming that "thename" and "account" are fake values for your explanation. If not, then maybe you are using "thename" as a variable and the query is taking it as a literal.
3) Assuming those are not the case, it is possible that your real db and table names are reserved words. If you enclose all references to the names in `backticks` (usually the key to left of digit 1 on the keyboard) does that help?
4) Really just guessing, to help any more we really need some more code lines.

Post Reply