I'm trying to create a database with a php file but I don't know why when i run it, it displays this error: "Error: CREATE TABLE contaclick ( id int(20) NOT NULL auto_increment, link varchar(255) NOT NULL default '', count int(20) NOT NULL default '0', PRIMARY KEY (id) ) TYPE=MyISAM;" Someone knows how to fix it?
my code in php is this:
<?
$login = "xxx";
$password = "xxx";
$database = "xxx";
$db = mysql_connect("xxx", $login, $password) or die ("Errore!");
mysql_select_db($database, $db);
$sql = "CREATE TABLE contaclick (
id int(20) NOT NULL auto_increment,
link varchar(255) NOT NULL default '',
count int(20) NOT NULL default '0',
PRIMARY KEY (id)
) TYPE=MyISAM;";
@mysql_query($sql) or die("Errore: $sql");
$sql = "INSERT INTO contaclick VALUES('', 'https://www.mywebsite.com/', '0')";
@mysql_query($sql) or die("Errore: $sql");
?>