Update database.php

This commit is contained in:
Namhyeon Go 2019-12-30 16:56:25 +09:00 committed by GitHub
parent 941a2eacfc
commit 7eddd7eccb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -746,6 +746,9 @@ if(!check_function_exists("exec_db_table_create")) {
function exec_db_table_create($schemes, $tablename, $options=array()) {
$_tablename = false;
$_prefix = get_value_in_array("prefix", $options, "");
$_suffix = get_value_in_array("suffix", $options, "");
$setindex = get_value_in_array("setindex", $options, false);
$sql = get_bind_to_sql_create($schemes, array(
"tablename" => $tablename
@ -756,7 +759,7 @@ if(!check_function_exists("exec_db_table_create")) {
$sql = sprintf("create index %s on %s (%s)", $k, $tablename, implode(", ", $v));
exec_db_query($sql);
}
$_tablename = $tablename;
$_tablename = sprintf("%s%s%s", $_prefix, $tablename, $_suffix);
}
return $_tablename;