I dont know what happened but I created a table just fine with mysql but everytime I try to create another table I get this error:
Could not create table: 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 'auto-increment, date datetime NOT NULL default '0000-00-00', event varchar(200) ' at line 2
but it is the same syntax i used for the other table...
this is my code
mysql_select_db('$dbname',$link) or die('Could not connect to database');
$sql= "CREATE TABLE events(
eventID smallint(4) NOT NULL auto-increment,
date datetime NOT NULL default '0000-00-00',
event varchar(200) NOT NULL,
PRIMARY KEY (eventID) ) ENGINE=MYISAM ";
mysql_query($sql,$link) or die("Could not create table: ".mysql_error());
echo "Table Created!";
what is worng with the syntax??