mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 22:02:13 +09:00
fix MySQLi class
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6953 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4a52404bb7
commit
6ab07bbaa5
1 changed files with 4 additions and 6 deletions
|
|
@ -73,7 +73,7 @@
|
|||
// db 정보가 없으면 무시
|
||||
if(!$this->hostname || !$this->userid || !$this->password || !$this->database) return;
|
||||
|
||||
// 접속시도
|
||||
// 접속시도
|
||||
if($this->port){
|
||||
$this->fd = mysqli_connect($this->hostname, $this->userid, $this->password, $this->database, $this->port);
|
||||
}else{
|
||||
|
|
@ -421,22 +421,20 @@
|
|||
$table_list[] = '`'.$this->prefix.$val.'`';
|
||||
}
|
||||
|
||||
// 컬럼 정리
|
||||
// 컬럼 정리
|
||||
foreach($output->columns as $key => $val) {
|
||||
$name = $val['name'];
|
||||
$value = $val['value'];
|
||||
|
||||
$value_list = array();
|
||||
if($output->column_type[$name]!='number') {
|
||||
$value = "'".$this->addQuotes($value)."'";
|
||||
if(!$value) $value = 'null';
|
||||
} elseif(!$value || is_numeric($value)) $value = (int)$value;
|
||||
|
||||
$column_list[] = '`'.$name.'`';
|
||||
$value_list[] = $value;
|
||||
}
|
||||
|
||||
$query = sprintf("insert into %s (%s) values (%s);", implode(',',$table_list), implode(',',$column_list), implode(',', $value_list));
|
||||
$query = sprintf("insert into %s (%s) values (%s)", implode(',',$table_list), implode(',',$column_list), implode(',', $value_list));
|
||||
|
||||
return $this->_query($query);
|
||||
}
|
||||
|
|
@ -450,7 +448,7 @@
|
|||
$table_list[] = '`'.$this->prefix.$val.'` as '.$key;
|
||||
}
|
||||
|
||||
// 컬럼 정리
|
||||
// 컬럼 정리
|
||||
foreach($output->columns as $key => $val) {
|
||||
if(!isset($val['value'])) continue;
|
||||
$name = $val['name'];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue