mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-18 02:39:56 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1106 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
4f1d02cda0
commit
ea50fbbaa6
43 changed files with 235 additions and 101 deletions
|
|
@ -235,6 +235,25 @@
|
|||
return new Object();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 이름, 값, operation, type으로 값을 변경
|
||||
**/
|
||||
function getConditionValue($name, $value, $operation, $type) {
|
||||
if($type == 'number') return (int)$value;
|
||||
|
||||
switch($operation) {
|
||||
case 'like_prefix' :
|
||||
$value = '%'.$value;
|
||||
break;
|
||||
case 'like' :
|
||||
$value = '%'.$value.'%';
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
return "'".$this->addQuotes($value)."'";
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 이름, 값, operation으로 조건절 작성
|
||||
**/
|
||||
|
|
@ -260,6 +279,15 @@
|
|||
if(!$value) return;
|
||||
return $name.' < '.$value;
|
||||
break;
|
||||
case 'like_prefix' :
|
||||
case 'like' :
|
||||
if(!$value) return;
|
||||
return $name.' like '.$value;
|
||||
break;
|
||||
case 'in' :
|
||||
if(!$value) return;
|
||||
return $name.' in ('.$value.')';
|
||||
break;
|
||||
case 'notequal' :
|
||||
if(!$value) return;
|
||||
return $name.' != '.$value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue