Jump to content
Larry Ullman's Book Forums
Sign in to follow this  

Recommended Posts

<code>

CREATE TABLE IF NOT EXISTS `award` (
  `award_id` int(11) NOT NULL AUTO_INCREMENT,
  `show_year` varchar(6) NOT NULL,
  `category_id` varchar(10) DEFAULT NULL,
  `category` varchar(100) DEFAULT NULL,
  `FirstPrize` varchar(40) DEFAULT NULL,
  `SecondPrize` varchar(40) DEFAULT NULL,
  `ThirdPrize` varchar(40) DEFAULT NULL,
  `FourthPrize` varchar(40) DEFAULT NULL,
  `HighlyCommended` varchar(40) DEFAULT NULL,
  PRIMARY KEY (`award_id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=29 ;
</code>

 

When I run the above command I get the response:

 

"#1050 - Table '`mwwg`.`award`' already exists"

 

If I then run "show tables;" the table "award" does not show up.

 

Any clues??

Share this post


Link to post
Share on other sites

If you're using phpMyAdmin, sometimes, it takes a bit for the table to show up in the left column. However, if you click on the DB link, it usually shows up in the list in the main window. Are you sure it's not there?

Share this post


Link to post
Share on other sites

The table does not show up either in phpMyAdmin nor from the command line.

This is a screen shot:

 

 

 and if I try to create it from the command line I get:

 

 

What's going on??

Share this post


Link to post
Share on other sites

Sorry guys but I am having trouble posting the screen shots.

 

Anyway, when using the command line the first screen lists all the tables in the database.  The table "award" does not show up.

The second shows what happens when I try to create the table.

It returns:

ERROR 1050 (42S01): Table ''mwwg'.'award' already exists''

Share this post


Link to post
Share on other sites

Are you sure you're in the right DB? Try outputting the SQL for the whole DB and see if it's there.

If you're having an unresolvable issue, I'd back up the data you want to save, and then reinstall everything.

  • Upvote 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...