| @@ 253-257 (lines=5) @@ | ||
| 250 | $field = Database::escape_string($field); |
|
| 251 | $value = Database::escape_string($value); |
|
| 252 | $simple_like = false; |
|
| 253 | if ($simple_like) { |
|
| 254 | $temp_conditions[] = $field." LIKE '$value%'"; |
|
| 255 | } else { |
|
| 256 | $temp_conditions[] = $field.' LIKE \'%'.$value.'%\''; |
|
| 257 | } |
|
| 258 | } |
|
| 259 | $condition = ' AND '; |
|
| 260 | if (!empty($temp_conditions)) { |
|
| @@ 1529-1533 (lines=5) @@ | ||
| 1526 | foreach ($conditions as $field => $value) { |
|
| 1527 | $field = Database::escape_string($field); |
|
| 1528 | $value = Database::escape_string($value); |
|
| 1529 | if ($simple_like) { |
|
| 1530 | $temp_conditions[] = $field." LIKE '$value%'"; |
|
| 1531 | } else { |
|
| 1532 | $temp_conditions[] = $field.' LIKE \'%'.$value.'%\''; |
|
| 1533 | } |
|
| 1534 | } |
|
| 1535 | if (!empty($temp_conditions)) { |
|
| 1536 | $sql_query .= implode(' '.$condition.' ', $temp_conditions); |
|