Prepared statements - if argument is not given as array (eg. for IN clauses) even though it should be, convert it to an array.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8633 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2011-07-25 16:47:22 +00:00
parent b3c75ac4db
commit 39c2c004c2
6 changed files with 118 additions and 185 deletions

View file

@ -145,6 +145,14 @@
$this->_test($xml_file, $argsString, $expected, array("25"));
}
function test_module_getModuleSites(){
$xml_file = _XE_PATH_ . "modules/module/queries/getModuleSites.xml";
//$argsString = '$args->module_srls = array(67, 65);';
$argsString = '$args->module_srls = "67, 65";';
$expected = 'SELECT [modules].[module_srl] as [module_srl], [sites].[domain] as [domain] FROM [xe_modules] as [modules] , [xe_sites] as [sites] WHERE [modules].[module_srl] in (?,?) and [sites].[site_srl] = [modules].[site_srl]';
$this->_test($xml_file, $argsString, $expected, array("67", "65"));
}
// TODO Something fishy about this query - to be investigated