<?
$mysql_id = mysql_connect("mysql-ip", "mysql-username", "mysql-passwort");
mysql_select_db("mysql-datenbank", $mysql_id);
$sql1 = "CREATE TABLE phpprogramme (
id int(11) DEFAULT '0' NOT NULL auto_increment,
titel text NOT NULL,
beschreibung text NOT NULL,
preis text NOT NULL,
braucht text NOT NULL,
hits int(11) DEFAULT '0' NOT NULL,
b1 int(11) DEFAULT '0' NOT NULL,
b2 int(11) DEFAULT '0' NOT NULL,
b3 int(11) DEFAULT '0' NOT NULL,
b4 int(11) DEFAULT '0' NOT NULL,
b5 int(11) DEFAULT '0' NOT NULL,
b6 int(11) DEFAULT '0' NOT NULL,
bb double(16,4),
neu int(11) DEFAULT '0' NOT NULL,
datum date DEFAULT '0000-00-00' NOT NULL,
bereich varchar(32) NOT NULL,
hplink text NOT NULL,
programmlink text NOT NULL,
PRIMARY KEY (id),
KEY bereich (bereich)
);";
$sql2 = "CREATE TABLE phpbereich (
id text NOT NULL,
titel text NOT NULL,
beschreibung text NOT NULL,
masse int(11) DEFAULT '0' NOT NULL,
hits int(11) DEFAULT '0' NOT NULL,
nr int(11) DEFAULT '0' NOT NULL auto_increment,
zunr int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (nr),
KEY zunr (zunr)
);";
$sql3 = "CREATE TABLE phpkommentar (
id int(11) DEFAULT '0' NOT NULL,
kommentar text NOT NULL,
name text NOT NULL,
mail text NOT NULL,
datum date DEFAULT '0000-00-00' NOT NULL,
status int(11) DEFAULT '0' NOT NULL,
nummer int(11) DEFAULT '0' NOT NULL auto_increment,
PRIMARY KEY (nummer),
KEY id (id)
);";
mysql_query($sql1, $mysql_id) or die(mysql_error());
mysql_query($sql2, $mysql_id) or die(mysql_error());
mysql_query($sql3, $mysql_id) or die(mysql_error());
mysql_close($mysql_id);
?>