mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
DBCubrid class: removed duplicate fetch code from pagination, updates to update, delete, insert queries.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8442 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
251555245d
commit
2e122219f1
5 changed files with 99 additions and 181 deletions
|
|
@ -64,7 +64,7 @@
|
|||
$this->orderby = $order;
|
||||
}
|
||||
|
||||
function setLimit($limit){
|
||||
function setLimit($limit = NULL){
|
||||
if(!isset($limit)) return;
|
||||
$this->limit = $limit;
|
||||
}
|
||||
|
|
@ -117,6 +117,25 @@
|
|||
return $select;
|
||||
}
|
||||
|
||||
function getUpdateString(){
|
||||
return $this->getSelectString();
|
||||
}
|
||||
|
||||
function getInsertString(){
|
||||
$columnsList = '';
|
||||
$valuesList = '';
|
||||
foreach($this->columns as $column){
|
||||
if($column->show()){
|
||||
$columnsList .= $column->getColumnName() . ', ';
|
||||
$valuesList .= $column->getValue() . ', ';
|
||||
}
|
||||
}
|
||||
$columnsList = substr($columnsList, 0, -2);
|
||||
$valuesList = substr($valuesList, 0, -2);
|
||||
|
||||
return "($columnsList) \n VALUES ($valuesList)";
|
||||
}
|
||||
|
||||
function getFromString(){
|
||||
$from = '';
|
||||
$simple_table_count = 0;
|
||||
|
|
@ -127,9 +146,6 @@
|
|||
}
|
||||
if(trim($from) == '') return '';
|
||||
return $from;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getWhereString(){
|
||||
|
|
@ -173,6 +189,10 @@
|
|||
}
|
||||
return $limit;
|
||||
}
|
||||
|
||||
function getFirstTableName(){
|
||||
return $this->tables[0]->getName();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue