1
purplerain
Corrupt Database?
  • 2006/9/6 16:55

  • purplerain

  • Just popping in

  • Posts: 5

  • Since: 2005/1/29


Hi,

I'm in the process of moving hosts, I backed up the database using their phpMyAdmin to two .gz files, one containing the structure and the other the data.

However, when I try to restore the structure, I get the following error:

Error
SQL query:

# --------------------------------------------------------
#
# Table structure for table `xoops_block_instance`
#
CREATE TABLE xoops_block_instance(

instanceid int( 12 ) unsigned NOT NULL AUTO_INCREMENT ,
bid int( 12 ) unsigned NOT NULL default '0',
options text NOT NULL ,
title varchar( 255 ) NOT NULL default '',
side tinyint( 1 ) unsigned NOT NULL default '0',
weight smallint( 5 ) unsigned NOT NULL default '0',
visible tinyint( 1 ) unsigned NOT NULL default '0',
bcachetime int( 10 ) unsigned NOT NULL default '0',
PRIMARY KEY ( instanceid ) ,
KEY JOIN ( instanceid, visible, weight )
) TYPE = MYISAM ;



MySQL said:

#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 'join (instanceid,visible,weight)
) TYPE=MyISAM' at line 11



Does anybody know whats causing this and what I can do about it, help please!!

2
JCDunnart
Re: Corrupt Database?
  • 2006/9/6 18:11

  • JCDunnart

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/7/1 5


'Join' is a reserved word in MySQL. Change it to something else, any other non-reserved word will do.

i.e. KEY instid ( instanceid, visible, weight )

this should work

3
Dave_L
Re: Corrupt Database?
  • 2006/9/6 20:06

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Or redo the database export from phpMyAdmin, and select the option "Enclose table and field names with backquotes".

4
purplerain
Re: Corrupt Database?
  • 2006/9/6 20:49

  • purplerain

  • Just popping in

  • Posts: 5

  • Since: 2005/1/29


Thanks for your help. That seems to of worked :)

Login

Who's Online

277 user(s) are online (172 user(s) are browsing Support Forums)


Members: 0


Guests: 277


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits