mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1084 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b433c8bb94
commit
1dcf686d69
1 changed files with 17 additions and 6 deletions
|
|
@ -132,6 +132,18 @@
|
|||
$this->setError(0,'success');
|
||||
|
||||
$this->stmt = $this->handler->prepare($query);
|
||||
|
||||
if($this->handler->errorCode() != '00000') {
|
||||
$this->setError($this->handler->errorCode(), print_r($this->handler->errorInfo(),true));
|
||||
|
||||
if(__DEBUG__) {
|
||||
$GLOBALS['__db_queries__'] .= sprintf("\t%02d. %s\n\t Fail : %s\n\t\t %s\n", ++$GLOBALS['__dbcnt'], $this->query, $this->errno, $this->errstr);
|
||||
}
|
||||
|
||||
unset($this->stmt);
|
||||
return;
|
||||
}
|
||||
|
||||
$this->bind_idx = 0;
|
||||
$this->bind_vars = array();
|
||||
}
|
||||
|
|
@ -165,8 +177,7 @@
|
|||
|
||||
$this->bind_idx = 0;
|
||||
$this->bind_vars = 0;
|
||||
|
||||
if($this->stmt->errorCode()!='00000') {
|
||||
if($this->stmt->errorCode() != '00000') {
|
||||
$this->setError($this->stmt->errorCode(),print_r($this->stmt->errorInfo(),true));
|
||||
|
||||
if(__DEBUG__) {
|
||||
|
|
@ -296,16 +307,16 @@
|
|||
|
||||
if(count($unique_list)) {
|
||||
foreach($unique_list as $key => $val) {
|
||||
$query = sprintf('CREATE UNIQUE INDEX IF NOT EXISTS %s (%s)', $key, implode(',',$val));
|
||||
$query = sprintf('CREATE UNIQUE INDEX %s_%s ON %s (%s)', $this->addQuotes($table_name), $key, $this->addQuotes($table_name), implode(',',$val));
|
||||
$this->_prepare($query);
|
||||
$this->_execute();
|
||||
if($this->isError()) $this->rollback();
|
||||
}
|
||||
}
|
||||
|
||||
if(count($unique_list)) {
|
||||
foreach($unique_list as $key => $val) {
|
||||
$query = sprintf('CREATE INDEX IF NOT EXISTS %s (%s)', $key, implode(',',$val));
|
||||
if(count($index_list)) {
|
||||
foreach($index_list as $key => $val) {
|
||||
$query = sprintf('CREATE INDEX %s_%s ON %s (%s)', $this->addQuotes($table_name), $key, $this->addQuotes($table_name), implode(',',$val));
|
||||
$this->_prepare($query);
|
||||
$this->_execute();
|
||||
if($this->isError()) $this->rollback();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue