Zen Cart Logo
Forums / General Questions / Error trying to use Data base optomise

Error trying to use Data base optomise

Locked

Views: 931

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
15 Jan 2008, 10:12 PM
#1
sparktronic avatar

sparktronic

Zen Follower

Join Date:
Nov 2005
Location:
Rochester, New York
Posts:
153
Plugin Contributions:
0

Error trying to use Data base optomise

Can someone tell me why I am getting this when I am in the admin of my catalog and in store manager and then go to the bottom and click optomise:

1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-cat1' at line 1
in:
[SHOW TABLE STATUS FROM rochesterlaw_org
-_cat1]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

I am on a unix server and running ver 1.37 I haven't changed anything nor has my host.

15 Jan 2008, 10:41 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Error trying to use Data base optomise

It's probably because you're using a '-' in your database name. Anything other than numbers, letters, and underscore are fringe characters in a database name and should be avoided. Even the mysql documentation suggests similarly. The installer doesn't let you use those characters anymore, for this reason.

You might try changing your DB_DATABASE setting to use backquotes around the database name in your admin configure.php file, ie:

define('DB_DATABASE', '`rochesterlaw_org_-_cat1`');

I'd recommend changing things to not use the hyphen though, if at all possible.

15 Jan 2008, 11:22 PM
#3
sparktronic avatar

sparktronic

Zen Follower

Join Date:
Nov 2005
Location:
Rochester, New York
Posts:
153
Plugin Contributions:
0

Re: Error trying to use Data base optomise

Unfortunately the sserver automatically puts that in. I only wanted cat1. I tried the back quotes, I assume it is the one next the the number 1 on the keyboard. That did not work. It tells me on the page, can't connect to the database.

16 Jan 2008, 5:35 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Error trying to use Data base optomise

Then you'll have to use phpMyAdmin to optimize your tables if you believe that is necessary.