- foreach($statemats as $fieldname => $value)
- {
- switch(substr($value, 0, 2)):
- case '>=':
- $conditions[] = $fieldname." >= '".substr($value, 2)."'";
- break;
- case '<=':
- $conditions[] = $fieldname." <= '".substr($value, 2)."'";
- break;
- default:
- switch(substr($value, 0, 1)):
- case '>':
- $conditions[] = $fieldname." > '".substr($value, 1)."'";
- break;
- case '<':
- $conditions[] = $fieldname." < '".substr($value, 1)."'";
- break;
- default:
- $conditions[] = $fieldname." = '".$value."'";
- endswitch;
- endswitch;
- }
Undefined
By: fruffl | Date: May 29 2010 16:23 | Format: None | Expires: never | Size: 656 B | Hits: 938
Latest pastes
1 hours ago
11 hours ago
1 days ago
2 days ago
2 days ago