Resource icon

"acdben" PHP Script for automatic DB creation 1

No permission to download
You not oblige to download the package, it's a simple PHP script that I paste here :


PHP:
<?php
$link = mysql_connect('localhost','root','root');
if (!$link) {
    die('connection error:' . mysql_error());
}

$sql = 'CREATE DATABASE a1_masterserver_rc_4_0_02 CHARACTER SET utf8 COLLATE utf8_general_ci ;';
if (mysql_query($sql, $link)) {
    echo "base a1_masterserver_rc_4_0_02 successfully created!\n";
} else {
    echo 'error when creating a database:' . mysql_error() . "\n";
}

$sql = 'CREATE DATABASE allods_auction_rc_4_0_02 CHARACTER SET utf8 COLLATE utf8_general_ci ;';
if (mysql_query($sql, $link)) {
    echo "base allods_auction_rc_4_0_02 successfully created!\n";
} else {
    echo 'error when creating a database:' . mysql_error() . "\n";
}

$sql = 'CREATE DATABASE allods_billing_rc_4_0_02 CHARACTER SET utf8 COLLATE utf8_general_ci ;';
if (mysql_query($sql, $link)) {
    echo "base allods_billing_rc_4_0_02 successfully created!\n";
} else {
    echo 'error when creating a database:' . mysql_error() . "\n";
}

$sql = 'CREATE DATABASE allods_guild_rc_4_0_02 CHARACTER SET utf8 COLLATE utf8_general_ci ;';
if (mysql_query($sql, $link)) {
    echo "base allods_guild_rc_4_0_02 successfully created!\n";
} else {
    echo 'error when creating a database:' . mysql_error() . "\n";
}

$sql = 'CREATE DATABASE allods_mail_rc_4_0_02 CHARACTER SET utf8 COLLATE utf8_general_ci ;';
if (mysql_query($sql, $link)) {
    echo "base allods_mail_rc_4_0_02 successfully created!\n";
} else {
    echo 'error when creating a database:' . mysql_error() . "\n";
}

$sql = 'CREATE DATABASE allods_online_rc_4_0_02 CHARACTER SET utf8 COLLATE utf8_general_ci ;';
if (mysql_query($sql, $link)) {
    echo "base allods_online_rc_4_0_02 successfully created!\n";
} else {
    echo 'error when creating a database:' . mysql_error() . "\n";
}

$sql = 'CREATE DATABASE a1_reports CHARACTER SET utf8 COLLATE utf8_general_ci ;';
if (mysql_query($sql, $link)) {
    echo "base a1_reports successfully created!\n";
} else {
    echo 'error when creating a database:' . mysql_error() . "\n";
}
?>
Author
Сорок два
Downloads
28
Views
999
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Сорок два

Top Bottom