mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
#113. Sqlite2/3에서 index add script 정상 동작하도록 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2392 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3aba4c14af
commit
0391fd3a62
2 changed files with 4 additions and 6 deletions
|
|
@ -250,8 +250,8 @@
|
|||
$query = sprintf("pragma index_info(%s)", $key_name);
|
||||
$result = $this->_query($query);
|
||||
$output = $this->_fetch($result);
|
||||
if($output->name) return true;
|
||||
return false;
|
||||
if(!$output) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -259,7 +259,6 @@
|
|||
if(!is_array($target_columns)) $target_columns = array($target_columns);
|
||||
|
||||
$key_name = sprintf('%s%s_%s', $this->prefix, $table_name, $index_name);
|
||||
$query = sprintf("pragma table_info(%s%s)", $this->prefix, $table_name);
|
||||
|
||||
$query = sprintf('CREATE %s INDEX %s ON %s%s (%s)', $is_unique?'UNIQUE':'', $key_name, $this->prefix, $table_name, implode(',',$target_columns));
|
||||
$this->_prepare($query);
|
||||
|
|
@ -275,9 +274,8 @@
|
|||
$query = sprintf("pragma index_info(%s)", $key_name);
|
||||
$this->_prepare($query);
|
||||
$output = $this->_execute();
|
||||
|
||||
if($output->name) return true;
|
||||
return false;
|
||||
if(!$output) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue