Issue 2191: XML query condition 'like' error.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10956 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2012-07-30 15:24:45 +00:00
parent 650910ff53
commit 2681ef5502
3 changed files with 74 additions and 37 deletions

View file

@ -329,4 +329,17 @@ class MysqlSelectTest extends MysqlTest {
';
$this->_test($xml_file, $argsString, $expected);
}
function testLikeWithDot()
{
$xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/likewithdot.xml";
$argsString = '';
$expected = 'select *
from `xe_layouts` as `layouts`
where `site_srl` = 0
and `layout_type` = \'p\'
and `layout` like \'%.%\'';
$this->_test($xml_file, $argsString, $expected);
}
}

View file

@ -0,0 +1,12 @@
<query id="likewithdot" action="select">
<tables>
<table name="layouts" />
</tables>
<columns>
</columns>
<conditions>
<condition operation="equal" column="site_srl" var="site_srl" default="0" />
<condition operation="equal" column="layout_type" var="layout_type" default="P" pipe="and" />
<condition operation="like" column="layout" default="%.%" pipe="and" />
</conditions>
</query>