mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
Issue 2213: queries xml 작성시 더하기(+) 사용시 파싱 에러 문제
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.2@10988 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
2a268b8f37
commit
f52594242e
3 changed files with 30 additions and 1 deletions
|
|
@ -59,7 +59,7 @@
|
|||
if($isColumnName = (strpos($condition->attrs->default, '.') !== false
|
||||
&& strpos($condition->attrs->default, '%') === false ))
|
||||
{
|
||||
$condition->attrs->default = $dbParser->parseColumnName($condition->attrs->default);
|
||||
$condition->attrs->default = $dbParser->parseExpression($condition->attrs->default);
|
||||
}
|
||||
|
||||
if($condition->node_name == 'query')
|
||||
|
|
|
|||
|
|
@ -342,4 +342,22 @@ class MysqlSelectTest extends MysqlTest {
|
|||
$this->_test($xml_file, $argsString, $expected);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Issue 2213
|
||||
* http://code.google.com/p/xe-core/issues/detail?id=2213
|
||||
*
|
||||
* @author Corina Udrescu (dev@xpressengine.org)
|
||||
*/
|
||||
function testSumInCondition()
|
||||
{
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/sumInCondition.xml";
|
||||
$argsString = '';
|
||||
$expected = 'select *
|
||||
from `xe_test11` as `a`
|
||||
where `site_srl` = 0
|
||||
and `price` <= `a`.`pa_1`+`a`.`pa_2`';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
|
||||
}
|
||||
}
|
||||
11
tests/classes/db/db/xml_query/mysql/data/sumInCondition.xml
Normal file
11
tests/classes/db/db/xml_query/mysql/data/sumInCondition.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<query id="sumInCondition" action="select">
|
||||
<tables>
|
||||
<table name="test11" alias="a" />
|
||||
</tables>
|
||||
<columns>
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="site_srl" var="site_srl" default="0" />
|
||||
<condition operation="less" column="price" default="a.pa_1+a.pa_2" pipe="and" />
|
||||
</conditions>
|
||||
</query>
|
||||
Loading…
Add table
Add a link
Reference in a new issue