|
|
|
@ -216,7 +216,7 @@ function db_query_parsed($sql, $ignore_errors = 0, $attach_mysql = "") {
|
|
|
|
|
|
|
|
|
|
|
|
function _drop_index ($table, $index) {
|
|
|
|
function _drop_index ($table, $index) {
|
|
|
|
global $CONF;
|
|
|
|
global $CONF;
|
|
|
|
$tabe = table_by_key ($table);
|
|
|
|
$table = table_by_key ($table);
|
|
|
|
|
|
|
|
|
|
|
|
if ($CONF['database_type'] == 'mysql' || $CONF['database_type'] == 'mysqli' ) {
|
|
|
|
if ($CONF['database_type'] == 'mysql' || $CONF['database_type'] == 'mysqli' ) {
|
|
|
|
return "ALTER TABLE $table DROP INDEX $index";
|
|
|
|
return "ALTER TABLE $table DROP INDEX $index";
|
|
|
|
@ -230,7 +230,7 @@ function _drop_index ($table, $index) {
|
|
|
|
|
|
|
|
|
|
|
|
function _add_index($table, $indexname, $fieldlist) {
|
|
|
|
function _add_index($table, $indexname, $fieldlist) {
|
|
|
|
global $CONF;
|
|
|
|
global $CONF;
|
|
|
|
$tabe = table_by_key ($table);
|
|
|
|
$table = table_by_key ($table);
|
|
|
|
|
|
|
|
|
|
|
|
if ($CONF['database_type'] == 'mysql' || $CONF['database_type'] == 'mysqli' ) {
|
|
|
|
if ($CONF['database_type'] == 'mysql' || $CONF['database_type'] == 'mysqli' ) {
|
|
|
|
return "ALTER TABLE $table ADD INDEX `$indexname` ( `$fieldlist` )";
|
|
|
|
return "ALTER TABLE $table ADD INDEX `$indexname` ( `$fieldlist` )";
|
|
|
|
|