mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
reverse merge from 1.6.0 (r10013)
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10690 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
ac1783e77f
commit
75f9ef95cf
7 changed files with 116 additions and 26 deletions
|
|
@ -93,6 +93,10 @@
|
|||
|
||||
$this->tables = $tables;
|
||||
}
|
||||
|
||||
function setSubquery($subquery){
|
||||
$this->subquery = $subquery;
|
||||
}
|
||||
|
||||
function setConditions($conditions){
|
||||
$this->conditions = array();
|
||||
|
|
@ -186,6 +190,20 @@
|
|||
|
||||
function getInsertString($with_values = true){
|
||||
$columnsList = '';
|
||||
if($this->subquery){ // means we have insert-select
|
||||
|
||||
foreach($this->columns as $column){
|
||||
$columnsList .= $column->getColumnName() . ', ';
|
||||
}
|
||||
$columnsList = substr($columnsList, 0, -2);
|
||||
|
||||
$selectStatement = $this->subquery->toString($with_values);
|
||||
$selectStatement = substr($selectStatement, 1, -1);
|
||||
|
||||
return "($columnsList) \n $selectStatement";
|
||||
}
|
||||
|
||||
|
||||
$valuesList = '';
|
||||
foreach($this->columns as $column){
|
||||
if($column->show()){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue