MySQL Forums
Forum List  »  MySQL Administrator

Re: Mysql Error
Posted by: Barry Galbraith
Date: February 19, 2010 06:26PM

Drop and create the table in two goes.

//create "title" table 
$title = "DROP TABLE IF EXISTS title";
$results = mysql_query($title) 
or die (mysql_error()); 


$title="CREATE TABLE title ( 
title_id int(20) NOT NULL auto_increment, 
title_name varchar(255)NOT NULL, 
title_serial tinyint(2)NOT NULL default 0, 
title_edition int(4) NOT NULL default 0, 
PRIMARY KEY (title_id), 
KEY title_serial (title_serial,title_edition) 
))"; 
$results = mysql_query($title) 
or die (mysql_error());

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
February 08, 2010 04:58AM
Re: Mysql Error
February 19, 2010 06:26PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.