| @@ 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)) { |
|
| @@ 1340-1344 (lines=5) @@ | ||
| 1337 | foreach ($conditions as $field => $value) { |
|
| 1338 | $field = Database::escape_string($field); |
|
| 1339 | $value = Database::escape_string($value); |
|
| 1340 | if ($simple_like) { |
|
| 1341 | $temp_conditions[] = $field." LIKE '$value%'"; |
|
| 1342 | } else { |
|
| 1343 | $temp_conditions[] = $field.' LIKE \'%'.$value.'%\''; |
|
| 1344 | } |
|
| 1345 | } |
|
| 1346 | if (!empty($temp_conditions)) { |
|
| 1347 | $sql_query .= implode(' '.$condition.' ', $temp_conditions); |
|