Location: PHPKode > projects > Caleb's Code > Cafe_Cart/install/reg_install.php
<?php

$install_tables = array(
   $pnconfig[prefix].'_cafepress_stores'    => "CREATE TABLE ".$pnconfig[prefix]."_cafepress_stores (id int(11) NOT NULL auto_increment, name varchar(50) NOT NULL default '', acct varchar(12) NOT NULL default '', description varchar(255) NOT NULL default '', PRIMARY KEY(id))",
   $pnconfig[prefix].'_cafepress_products'  => "CREATE TABLE ".$pnconfig[prefix]."_cafepress_products (prod int(11) NOT NULL, name varchar(50) NOT NULL default '', ptype int(2) NOT NULL default '', charge varchar(6) NOT NULL default '', store int(11) NOT NULL default '', description varchar(255) NOT NULL default '', def_view CHAR(1) NOT NULL default 'F', active bool NOT NULL default '1', PRIMARY KEY(prod))",
   $pnconfig[prefix].'_cafepress_seasonal'  => "CREATE TABLE ".$pnconfig[prefix]."_cafepress_seasonal (prod INT(11) NOT NULL, name varchar(50) NOT NULL default '', charge varchar(6) NOT NULL default '', store int(11) NOT NULL default '', description varchar(255) NOT NULL default '', twosided bool NOT NULL default '0', def_view CHAR(1) NOT NULL default 'F', sizes VARCHAR(25) NOT NULL default '0', expire DATE, active bool NOT NULL default '1', PRIMARY KEY(prod))"
   );

foreach ($install_tables as $table => $create_query) {
      if (mysql_query($create_query)) echo "<li>$table created\n";
      else echo "<li><font color=red>$table creation failed</font>\n <ul><li>".mysql_errno().": ".mysql_error()."</ul>\n";
      }

?>
Return current item: Caleb's Code