mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 04:24:14 +09:00
Issue 1778: DB Classes: Add prepared statements support- fix for IN clause when value is empty string
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10491 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4065581cb3
commit
f1a80e7bbd
2 changed files with 6 additions and 6 deletions
|
|
@ -92,7 +92,7 @@ class Argument {
|
||||||
if ($column_type == 'number') {
|
if ($column_type == 'number') {
|
||||||
if (is_array($value)) {
|
if (is_array($value)) {
|
||||||
foreach ($value AS $key => $val) {
|
foreach ($value AS $key => $val) {
|
||||||
if (isset($val)) {
|
if (isset($val) && $val !== '') {
|
||||||
$value[$key] = (int) $val;
|
$value[$key] = (int) $val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,11 @@
|
||||||
|
|
||||||
|
|
||||||
function ConditionArgument($name, $value, $operation){
|
function ConditionArgument($name, $value, $operation){
|
||||||
if(isset($value) && in_array($operation, array('in', 'notin', 'between')) && !is_array($value)){
|
if(isset($value) && in_array($operation, array('in', 'notin', 'between')) && !is_array($value) && $value != ''){
|
||||||
$value = str_replace(' ', '', $value);
|
$value = str_replace(' ', '', $value);
|
||||||
$value = str_replace('\'', '', $value);
|
$value = str_replace('\'', '', $value);
|
||||||
$value = explode(',', $value);
|
$value = explode(',', $value);
|
||||||
}
|
}
|
||||||
parent::Argument($name, $value);
|
parent::Argument($name, $value);
|
||||||
$this->operation = $operation;
|
$this->operation = $operation;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue