Generally print out all possible error messages, like "MySQL-Error: 1064 -> You have an error in your SQL syntax near '' at line 5",
so it is quiet easy to find the error
... or print ">>> MySQL-Error: ".mysql_errno()." -> ".mysql_error()."<br>\n";
In your code you forgot a ")" after index definition (Field1))
$db = mysql_connect("localhost", "user", "password")
or print ">>> MySQL-Error: ".mysql_errno()." -> ".mysql_error()."<br>\n";
mysql_select_db("database",$db)
or print "could not create connect >>> MySQL-Error: ".mysql_errno()." -> ".mysql_error()."<br>\n";
mysql_query("CREATE TABLE table1 (
field1 mediumint(9) DEFAULT '0' NOT NULL,
field2 timestamp(14),
field3 varchar(255) NOT NULL,
KEY Id (field1))")
or print "could not create table: adclicks >>> MySQL-Error: ".mysql_errno()." -> ".mysql_error()."<br>\n";