Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Old 07-23-2006, 03:00 PM SQL help please
BamaStangGuy's Avatar
Defies a Status

Posts: 1,779
Trades: 2
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
__________________

Please login or register to view this content. Registration is FREE
- Ford Mustang Enthusiast Website

Please login or register to view this content. Registration is FREE
- General Music Discussion Forum

BamaStangGuy is offline
Reply With Quote
View Public Profile Visit BamaStangGuy's homepage!
 
 
Register now for full access!
Old 07-23-2006, 03:13 PM
Thinker

Posts: 60
Trades: 0
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, 03:15 PM
BamaStangGuy's Avatar
Defies a Status

Posts: 1,779
Trades: 2
ah thank you
__________________

Please login or register to view this content. Registration is FREE
- Ford Mustang Enthusiast Website

Please login or register to view this content. Registration is FREE
- 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 Search this Thread
Search this Thread:

Advanced Search

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

BB 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 1.34047 seconds with 12 queries