Commit e27b056b authored by screeper's avatar screeper

Update for prefix

parent e28392d8
...@@ -5,6 +5,9 @@ error_reporting(E_ALL); ...@@ -5,6 +5,9 @@ error_reporting(E_ALL);
$db = new Mysqlidb('localhost', 'root', '', 'testdb'); $db = new Mysqlidb('localhost', 'root', '', 'testdb');
if(!$db) die("Database error"); if(!$db) die("Database error");
$prefix = 'prefix_';
$db->setPrefix($prefix)
$tables = Array ( $tables = Array (
'users' => Array ( 'users' => Array (
'login' => 'char(10) not null', 'login' => 'char(10) not null',
...@@ -92,7 +95,7 @@ function createTable ($name, $data) { ...@@ -92,7 +95,7 @@ function createTable ($name, $data) {
foreach ($tables as $name => $fields) { foreach ($tables as $name => $fields) {
$db->rawQuery("DROP TABLE $name"); $db->rawQuery("DROP TABLE $name");
createTable ($name, $fields); createTable ($prefix.$name, $fields);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment