Site hosted by Angelfire.com: Build your free website today!

<?php

require "secret/config.php";
mysql_connect($dbhost,$dbusername,$dbpassword) or die(mysql_error());
mysql_select_db($dbname) or die(mysql_error());


// Update für Version 2.2 mit neuer Galaxieansicht
// Update to version 2.2
$query = "ALTER TABLE $dbtablename ADD mondgr SMALLINT UNSIGNED DEFAULT '0' NOT NULL AFTER mond ,
ADD metall INT UNSIGNED DEFAULT '0' NOT NULL AFTER mondgr ,
ADD kristall INT UNSIGNED DEFAULT '0' NOT NULL AFTER metall";
mysql_query($query) or die(mysql_error());
echo "done<br />";

$query = "CREATE TABLE $pstablename (
      playername VARCHAR( 30 ) NOT NULL ,
      rank SMALLINT UNSIGNED DEFAULT '0' NOT NULL ,
      last_update VARCHAR( 20 ) NOT NULL ,
      PRIMARY KEY ( playername )
      )";
mysql_query($query) or die(mysql_error());
echo "done<br />";

$query = "CREATE TABLE $astablename (
      allyname VARCHAR( 30 ) NOT NULL ,
      rank SMALLINT UNSIGNED DEFAULT '0' NOT NULL ,
      members SMALLINT UNSIGNED DEFAULT '0' NOT NULL ,
      last_update VARCHAR( 20 ) NOT NULL ,
      PRIMARY KEY ( allyname )
      )";
mysql_query($query) or die(mysql_error());
echo "done<br />";

echo "Update complete.";

?>