mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
cubrid addindex, indexexist 변경
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2415 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c78d8bb4a4
commit
3f7bf793f2
1 changed files with 7 additions and 2 deletions
|
|
@ -244,7 +244,7 @@
|
|||
function addIndex($table_name, $index_name, $target_columns, $is_unique = false) {
|
||||
if(!is_array($target_columns)) $target_columns = array($target_columns);
|
||||
|
||||
$query = sprintf("create %s index %s%s_%s on %s%s (%s);", $is_unique?'unique':'', $this->prefix, $table_name, $index_name, $this->prefix, $table_name, "'".implode("','",$target_columns)."'");
|
||||
$query = sprintf("create %s index %s on %s%s (%s);", $is_unique?'unique':'', $index_name, $this->prefix, $table_name, implode(',',$target_columns));
|
||||
$this->_query($query);
|
||||
}
|
||||
|
||||
|
|
@ -252,7 +252,12 @@
|
|||
* @brief 특정 테이블의 index 정보를 return
|
||||
**/
|
||||
function isIndexExists($table_name, $index_name) {
|
||||
return false;
|
||||
$query = sprintf("select * from db_index where class_name='%s%s' and index_name = '%s' ", $this->prefix, $table_name, $index_name);
|
||||
$result = $this->_query($query);
|
||||
if($this->isError()) return false;
|
||||
$output = $this->_fetch($result);
|
||||
if(!$output) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue