View file phpmytourney/install-uninstall/createdb.php

File size: 1.54Kb
<?
/***********************************************************
* This file was created by Jйrфme Poulin under the phpmytourney
* project.  
* You can modify and redistribute this file as long as this
* copyright notice stays in the file.
*
* If you want to do major upgrades on my script, please contact
* me and we could work together.
* 
* Jйrфme Poulin
* Student University of Sherbrooke
* [email protected] <== dont use for support !!!
* http:/phpmytourney.sourceforge.net/ <== use sourceforce forum for support
* 
*  phpMyTourney <C> 2001-2002
************************************************************/
include('../config.inc');
include($path_common . 'mysql.inc');

$query[] = "CREATE TABLE  " . $GLOBALS['dbtable_header'] . "info (
   	id		int(11) unsigned NOT NULL auto_increment PRIMARY KEY,
	hostname	text,
	tname		text,
	tdatetime	datetime,
	ttype		text,
	tspeed		text,
	prize		text,
	maps		blob,
	nb_per_team 	int(3) unsigned NOT NULL,
	status 		int(1) unsigned NOT NULL
)";


$query[] = "CREATE TABLE ALLTOURNEY_players (
   	id 		int(11) unsigned NOT NULL  auto_increment,
   	name 		text NOT NULL,
	email 		text NOT NULL,
   	passwd 		text NOT NULL,
	type 		smallint(3) unsigned NOT NULL,
	j_date		date NOT NULL,
	active  	char(1) NOT NULL DEFAULT 'N',
	ip		text,   	
   	PRIMARY KEY (id)
)";

if (execute_queries($query,"smooth"))
	echo("<br><b>Tables Created Succesfully...</b>");
else
	echo("	<br><b>An Error occured... 
		<br>Make sure table doesnt allready exists (use dropdb.php to remove em)");	
?>