mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 06:42:14 +09:00
Issue 388 - Query cache error related table alias
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9544 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
92a49aa179
commit
308d1606a7
8 changed files with 94 additions and 14 deletions
|
|
@ -26,6 +26,7 @@
|
|||
require(_XE_PATH_.'classes/db/queryparts/expression/SelectExpression.class.php');
|
||||
require(_XE_PATH_.'classes/db/queryparts/expression/InsertExpression.class.php');
|
||||
require(_XE_PATH_.'classes/db/queryparts/expression/UpdateExpression.class.php');
|
||||
require(_XE_PATH_.'classes/db/queryparts/expression/UpdateExpressionWithoutArgument.class.php');
|
||||
require(_XE_PATH_.'classes/db/queryparts/table/Table.class.php');
|
||||
require(_XE_PATH_.'classes/db/queryparts/table/JoinTable.class.php');
|
||||
require(_XE_PATH_.'classes/db/queryparts/table/CubridTableWithHint.class.php');
|
||||
|
|
@ -605,22 +606,22 @@
|
|||
$columnsList = $query->getUpdateString($with_values);
|
||||
if($columnsList == '') return new Object(-1, "Invalid query");
|
||||
|
||||
$tableName = $query->getFirstTableName();
|
||||
if($tableName == '') return new Object(-1, "Invalid query");
|
||||
$tables = $query->getFromString($with_values);
|
||||
if($tables == '') return new Object(-1, "Invalid query");
|
||||
|
||||
$where = $query->getWhereString($with_values);
|
||||
if($where != '') $where = ' WHERE ' . $where;
|
||||
|
||||
|
||||
$priority = $with_priority?$query->getPriority():'';
|
||||
|
||||
return "UPDATE $priority $tableName SET $columnsList ".$where;
|
||||
return "UPDATE $priority $tables SET $columnsList ".$where;
|
||||
}
|
||||
|
||||
function getInsertSql($query, $with_values = true, $with_priority = false){
|
||||
$tableName = $query->getFirstTableName();
|
||||
$values = $query->getInsertString($with_values);
|
||||
$priority = $with_priority?$query->getPriority():'';
|
||||
|
||||
|
||||
return "INSERT $priority INTO $tableName \n $values";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue