Reply
SQL help please
Old 07-23-2006, 02:00 PM SQL help please
BamaStangGuy's Avatar
This is my custom title

Posts: 1,779
I got this free script that is no longer supported and I am trying to upload the SQL file to my database but I am returning errors.

This is the sql:

Code:
CREATE TABLE `lyrics_albums` (
  `id` int(11) NOT NULL auto_increment,
  `artist` int(11) NOT NULL default '0',
  `album` varchar(40) NOT NULL default '',
  PRIMARY KEY  (`id`)
  UNIQUE KEY `album` (`album`)
) TYPE=MyISAM;


CREATE TABLE `lyrics_artist` (
  `id` int(11) NOT NULL auto_increment,
  `artist` varchar(30) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `artist` (`artist`)
) TYPE=MyISAM;


CREATE TABLE `lyrics_songs` (
  `id` int(11) NOT NULL auto_increment,
  `album` int(11) NOT NULL default '0',
  `name` varchar(30) NOT NULL default '',
  `text` text NOT NULL,
  PRIMARY KEY  (`id`)
  UNIQUE KEY `name` (`name`)
) TYPE=MyISAM;
The lyrics_artist one uploads if I do them seperately. However the lyrics_songs and lyrics_album return these errors:

Quote:
#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 'UNIQUE KEY `album` (`album`)
) TYPE=MyISAM' at line 6
Quote:
#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 'UNIQUE KEY `name` (`name`)
) TYPE=MyISAM' at line 7
Any help is appreciated and an explanation of why one of them works and the other two doesnt would help me understand why it is doing this. I am trying to learn SQL
__________________
Mustang Evolution - Ford Mustang Enthusiast Website
Music Forums - General Music Discussion Forum

BamaStangGuy is offline
Reply With Quote
View Public Profile Visit BamaStangGuy's homepage!
 
When You Register, These Ads Go Away!
     
Old 07-23-2006, 02:13 PM
Thinker

Posts: 60
looks like you're missing a comma

Code:
CREATE TABLE `lyrics_albums` (
  `id` int(11) NOT NULL auto_increment,
  `artist` int(11) NOT NULL default '0',
  `album` varchar(40) NOT NULL default '',
  PRIMARY KEY  (`id`),  <-- Missing comma here
  UNIQUE KEY `album` (`album`)
) TYPE=MyISAM;


CREATE TABLE `lyrics_artist` (
  `id` int(11) NOT NULL auto_increment,
  `artist` varchar(30) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `artist` (`artist`)
) TYPE=MyISAM;


CREATE TABLE `lyrics_songs` (
  `id` int(11) NOT NULL auto_increment,
  `album` int(11) NOT NULL default '0',
  `name` varchar(30) NOT NULL default '',
  `text` text NOT NULL,
  PRIMARY KEY  (`id`),  <-- Missing comma here
  UNIQUE KEY `name` (`name`)
) TYPE=MyISAM;
imported_Think is offline
Reply With Quote
View Public Profile
 
Old 07-23-2006, 02:15 PM
BamaStangGuy's Avatar
This is my custom title

Posts: 1,779
ah thank you
__________________
Mustang Evolution - Ford Mustang Enthusiast Website
Music Forums - General Music Discussion Forum

BamaStangGuy is offline
Reply With Quote
View Public Profile Visit BamaStangGuy's homepage!
 
Reply     « Reply to SQL help please
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11822 seconds with 13 queries