Skip to content

Commit

Permalink
Fixed CREATE TABLE command in makedb.php ...
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 5, 2010
1 parent 739b5c3 commit 1e93041
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
10 changes: 8 additions & 2 deletions database.php
Expand Up @@ -5,16 +5,22 @@

require_once 'dbpass.php';

$GDebugSQL = false;
$GDebugSQLErrors = true;
$dblink = NULL;

function write_error($err)
{
//print("\n\n$err\n\n");
global $GDebugSQLErrors;
if ($GDebugSQLErrors)
print("\n\nERROR: $err\n\n");
} // write_error

function write_debug($err)
{
//print("\n\n$err\n\n");
global $GDebugSQL;
if ($GDebugSQL)
print("\n\nDEBUG: $err\n\n");
} // write_debug

function get_dblink()
Expand Down
6 changes: 4 additions & 2 deletions makedb.php
Expand Up @@ -18,6 +18,8 @@
exit(0);
} // if

$GDebugSQL = true;
$GDebugSQLErrors = true;

echo "Nuking any existing database (too late to go back, now!)...\n";
do_dbquery("drop database if exists $dbname");
Expand All @@ -34,10 +36,10 @@
" steamid bigint not null," .
" appid int unsigned not null," .
" tag varchar(64) not null," .
" ipaddr unsigned int not null," .
" ipaddr int unsigned not null," .
" posted datetime not null," .
" deleted datetime default null," .
" deletedipaddr unsigned int default null," .
" deletedipaddr int unsigned default null," .
" index gametag_index (steamid, appid)," .
" primary key (id)" .
" ) character set utf8"
Expand Down

0 comments on commit 1e93041

Please sign in to comment.