mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
reverse merge from 1.6.0 (r10370)
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10708 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8f11300f70
commit
1321d26975
2 changed files with 37 additions and 0 deletions
21
tests/classes/db/db/xml_query/cubrid/data/doc_subquery.xml
Normal file
21
tests/classes/db/db/xml_query/cubrid/data/doc_subquery.xml
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<query id="getMemberInfo" action="select">
|
||||
<tables>
|
||||
<table name="member" alias="member" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="*" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<query operation="equal" column="regdate" notnull="notnull" alias="documentMaxRegdate">
|
||||
<tables>
|
||||
<table name="documents" alias="documents" />
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="max(regdate)" alias="maxregdate" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="documents.user_id" var="member.user_id" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
</conditions>
|
||||
</query>
|
||||
|
|
@ -38,6 +38,22 @@ class MysqlInsertTest extends MysqlTest
|
|||
where `column4` >= 7';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
function testInsertSelectStatement2()
|
||||
{
|
||||
$xml_file = _XE_PATH_ . "modules/wiki/queries/insertLinkedDocuments.xml";
|
||||
$argsString = '$args->document_srl = 7;
|
||||
$args->module_srl = 10;
|
||||
$args->alias_list = array("unu", "doi");
|
||||
';
|
||||
$expected = 'insert into `xe_wiki_links`
|
||||
(`cur_doc_srl`, `link_doc_srl`)
|
||||
select 7, `document_srl`
|
||||
from `xe_document_aliases` as `document_aliases`
|
||||
where `module_srl` = 10
|
||||
and `alias_title` in (\'unu\',\'doi\')';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
}
|
||||
|
||||
/* End of file MysqlInsertTest.php */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue