basic-php-10-make-table.php / php
<?php require('config.php'); conn); enum('good','evil') NOT NULL default 'good', PRIMARY KEY (id) )"; sql2 = "CREATE TABLE IF NOT EXISTS char_power ( id int(11) NOT NULL auto_increment, power varchar(40) NOT NULL default '', PRIMARY KEY (id) )"; sql4 = "CREATE TABLE IF NOT EXISTS char_lair ( id int(11) NOT NULL auto_increment, zip_id varchar(10) NOT NULL default '00000', lair_addr varchar(40) NOT NULL default '', PRIMARY KEY (id) )"; sql6 = "CREATE TABLE IF NOT EXISTS char_good_bad_link ( good_id int(11) NOT NULL default 0, bad_id int(11) NOT NULL default 0, PRIMARY KEY (good_id,bad_id) )"; mysql_query(sql2) or die(mysql_error()); mysql_query(sql4) or die(mysql_error()); mysql_query(sql6) or die(mysql_error()); echo "Done."; ?>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.