| @@ 241-245 (lines=5) @@ | ||
| 238 | $field = Database::escape_string($field); |
|
| 239 | $value = Database::escape_string($value); |
|
| 240 | $simple_like = false; |
|
| 241 | if ($simple_like) { |
|
| 242 | $temp_conditions[] = $field . " LIKE '$value%'"; |
|
| 243 | } else { |
|
| 244 | $temp_conditions[] = $field . ' LIKE \'%' . $value . '%\''; |
|
| 245 | } |
|
| 246 | } |
|
| 247 | $condition = ' AND '; |
|
| 248 | if (!empty($temp_conditions)) { |
|
| @@ 1331-1335 (lines=5) @@ | ||
| 1328 | foreach ($conditions as $field => $value) { |
|
| 1329 | $field = Database::escape_string($field); |
|
| 1330 | $value = Database::escape_string($value); |
|
| 1331 | if ($simple_like) { |
|
| 1332 | $temp_conditions[] = $field." LIKE '$value%'"; |
|
| 1333 | } else { |
|
| 1334 | $temp_conditions[] = $field.' LIKE \'%'.$value.'%\''; |
|
| 1335 | } |
|
| 1336 | } |
|
| 1337 | if (!empty($temp_conditions)) { |
|
| 1338 | $sql_query .= implode(' '.$condition.' ', $temp_conditions); |
|