Update to array condition arguments.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0-DB@8602 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2011-07-18 12:25:27 +00:00
parent 9606e263e8
commit bf1d72e478
3 changed files with 24 additions and 25 deletions

View file

@ -22,34 +22,20 @@
$value = $this->value;
switch($operation) {
case 'like_prefix' :
$this->value = $value.'%';
break;
case 'like_tail' :
$this->value = '%'.$value;
break;
case 'like' :
$this->value = '%'.$value.'%';
break;
case 'in' :
if(is_array($value))
{
//$value = $this->addQuotesArray($value);
if($this->getType() == 'number')
$this->value = "(" . join(',',$value) . ")";
else
$this->value = "('". join("','",$value)."')";
}
else
{
$this->value = $value;
}
break;
case 'like_prefix' :
$this->value = $value.'%';
break;
case 'like_tail' :
$this->value = '%'.$value;
break;
case 'like' :
$this->value = '%'.$value.'%';
break;
}
/*
//if(!in_array($operation,array('in','notin','between')) && is_array($value)){
// $value = join(',', $value);
//}
//}
// Daca operatia nu este in, notin, between si coloana e de tip numeric
// daca valoarea e array -> concatenare
// daca valoarea nu e array si nici nu contine paranteze (nu e functie) -> return (int)