All pastes #3385 Raw Edit

Anonymous

public php v1 · immutable
#3385 ·published 2004-12-24 20:25 UTC
rendered paste body
<?require("mysql_info.php");// Create the queries        $blog_sql = ' CREATE TABLE `$sql_db`.`blog` ( `id` int( 6 ) NOT NULL AUTO_INCREMENT ,'        . ' `date` text NOT NULL ,'        . ' `time` text NOT NULL ,'        . ' `entry` text NOT NULL ,'        . ' `author` text NOT NULL ,'        . ' `title` text NOT NULL ,'        . ' `post` varchar( 6 ) NOT NULL default '''','        . ' PRIMARY KEY ( `id` ) ,'        . ' UNIQUE KEY `id` ( `id` ) ,'        . ' KEY `id_2` ( `id` ) ) TYPE = MYISAM ';         $blog_comments_sql = ' CREATE TABLE `$sql_db`.`blog_comments` ( `id` int( 6 ) NOT NULL AUTO_INCREMENT ,'        . ' `entry` text NOT NULL ,'        . ' `author` text NOT NULL ,'        . ' `title` text NOT NULL ,'        . ' `post` int( 6 ) unsigned NOT NULL default ''0'','        . ' `ip` varchar( 30 ) NOT NULL default '''','        . ' PRIMARY KEY ( `id` ) ,'        . ' UNIQUE KEY `id` ( `id` ) ,'        . ' KEY `id_2` ( `id` ) ) TYPE = MYISAM ';       $ip_sql = ' CREATE TABLE `$sql_db`.`ip` ( `id` int( 6 ) NOT NULL AUTO_INCREMENT ,'        . ' `IP` varchar( 30 ) NOT NULL default '''','        . ' `num` int( 6 ) NOT NULL default ''0'','        . ' PRIMARY KEY ( `id` ) ,'        . ' UNIQUE KEY `id` ( `id` ) ,'        . ' KEY `id_2` ( `id` ) ) TYPE = MYISAM ';        // Create databases                mysql_query($blog_sql) or die("Couldn't create `blog` database. MySQL returned this error:<br>".mysql_error());mysql_query($blog__comments_sql) or die("Couldn't create `blog_comments` database. MySQL returned this error:<br>".mysql_error());mysql_query($ip_sql) or die("Couldn't create `ip` database. MySQL returned this error:<br>".mysql_error());                ?>