Hi
I'm trying to install this and cannot as I get an error message. Essentially it's a known bug with MySQL when using UTF8 but even though I know that I don't know how to get around it. Can anyone help?
SQL query:
# Table: 'amazonitem'
#
CREATE TABLE amazonitem(
ASIN varchar( 10 ) NOT NULL default '',
DetailPageURL text,
SmallImageURL varchar( 255 ) default '',
SmallImageHeight int( 10 ) unsigned default '0',
SmallImageWidth int( 10 ) unsigned default '0',
MediumImageURL varchar( 255 ) default '',
MediumImageHeight int( 10 ) unsigned default '0',
MediumImageWidth int( 10 ) unsigned default '0',
LargeImageURL varchar( 255 ) default '',
LargeImageHeight int( 10 ) unsigned default '0',
LargeImageWidth int( 10 ) unsigned default '0',
Author varchar( 255 ) NOT NULL default '',
Binding varchar( 100 ) default '',
listAmount int( 10 ) unsigned default '0',
listCurrencyCode char( 3 ) default '',
listFormattedPrice varchar( 10 ) default '',
Title varchar( 100 ) NOT NULL default '',
Amount int( 10 ) unsigned default '0',
CurrencyCode char( 3 ) default '',
FormattedPrice varchar( 10 ) default '',
Availability varchar( 50 ) default '',
PriceDate datetime default '0000-00-00 00:00:00',
PRIMARY KEY ( ASIN ) ,
UNIQUE KEY ASIN( ASIN ) ,
KEY Title( Title ) ,
KEY Author( Author, Title )
) TYPE = MYISAM ;
MySQL said: Documentation
#1071 - Specified key was too long; max key length is 1000 bytes
Comments
Comment #1
Prometheus6 commentedIt's the Author index. I put it there before we went UTF-8 just in case, but it's not used so you can drop it.
Comment #2
Cromicon commentedThank Prometheus.
I must be making mustakes with the MySQL syntax when I try to drop author as I just get errors all over the place in phpmyadmin. I think I need lessons! When you get some time could you put up a schema that I could try. Thanks very much.
Comment #3
Cromicon commentedI'm using MySQL - 4.1.19 and trying this query:
code>CREATE TABLE amazonitem(
ASIN varchar( 10 ) NOT NULL default '',
DetailPageURL text,
SmallImageURL varchar( 255 ) default '',
SmallImageHeight int( 10 ) unsigned default '0',
SmallImageWidth int( 10 ) unsigned default '0',
MediumImageURL varchar( 255 ) default '',
MediumImageHeight int( 10 ) unsigned default '0',
MediumImageWidth int( 10 ) unsigned default '0',
LargeImageURL varchar( 255 ) default '',
LargeImageHeight int( 10 ) unsigned default '0',
LargeImageWidth int( 10 ) unsigned default '0',
Binding varchar( 100 ) default '',
listAmount int( 10 ) unsigned default '0',
listCurrencyCode char( 3 ) default '',
listFormattedPrice varchar( 10 ) default '',
Title varchar( 100 ) NOT NULL default '',
Amount int( 10 ) unsigned default '0',
CurrencyCode char( 3 ) default '',
FormattedPrice varchar( 10 ) default '',
Availability varchar( 50 ) default '',
PriceDate datetime default '0000-00-00 00:00:00',
PRIMARY KEY ( ASIN ) ,
UNIQUE KEY ASIN( ASIN ) ,
) 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 ') TYPE = MYISAM' at line 25
Now I'm stumped. :-P
Comment #4
Prometheus6 commentedYou have an extra comma
Comment #5
Cromicon commentedHmm that looks like a semi-colon and was in the original. I've tried it without and still get an error. I've removed and jiggled commas and brackets but still get errors in the same area. I really can't get that to work. If anyone (including Prometheus! ;-)) can post a schema that doesn't include the author field and works I might be able to use the module! hehe Thanks very much. Meanwhile I'll jiggle the schema some more and try again.
Comment #6
Cromicon commentedI didn't identify what I did wrong pr5eviously but after you mentioned the author table wasn't used, rather than not create it I just shrunk it to 100 rather than 255 and that allowed the query through.
Cheers. :-)
Comment #7
Prometheus6 commentedI finally got rid of the extra index.
Comment #8
Cromicon commentedCheers for that! :-)
Comment #9
Prometheus6 commented