mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +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 (is_array($value)) {
|
||||
foreach ($value AS $key => $val) {
|
||||
if (isset($val)) {
|
||||
if (isset($val) && $val !== '') {
|
||||
$value[$key] = (int) $val;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,11 +5,11 @@
|
|||
|
||||
|
||||
function ConditionArgument($name, $value, $operation){
|
||||
if(isset($value) && in_array($operation, array('in', 'notin', 'between')) && !is_array($value)){
|
||||
$value = str_replace(' ', '', $value);
|
||||
$value = str_replace('\'', '', $value);
|
||||
$value = explode(',', $value);
|
||||
}
|
||||
if(isset($value) && in_array($operation, array('in', 'notin', 'between')) && !is_array($value) && $value != ''){
|
||||
$value = str_replace(' ', '', $value);
|
||||
$value = str_replace('\'', '', $value);
|
||||
$value = explode(',', $value);
|
||||
}
|
||||
parent::Argument($name, $value);
|
||||
$this->operation = $operation;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue