| @@ 251-255 (lines=5) @@ | ||
| 248 | $field = Database::escape_string($field); |
|
| 249 | $value = Database::escape_string($value); |
|
| 250 | $simple_like = false; |
|
| 251 | if ($simple_like) { |
|
| 252 | $temp_conditions[] = $field . " LIKE '$value%'"; |
|
| 253 | } else { |
|
| 254 | $temp_conditions[] = $field . ' LIKE \'%' . $value . '%\''; |
|
| 255 | } |
|
| 256 | } |
|
| 257 | $condition = ' AND '; |
|
| 258 | if (!empty($temp_conditions)) { |
|
| @@ 1446-1450 (lines=5) @@ | ||
| 1443 | foreach ($conditions as $field => $value) { |
|
| 1444 | $field = Database::escape_string($field); |
|
| 1445 | $value = Database::escape_string($value); |
|
| 1446 | if ($simple_like) { |
|
| 1447 | $temp_conditions[] = $field." LIKE '$value%'"; |
|
| 1448 | } else { |
|
| 1449 | $temp_conditions[] = $field.' LIKE \'%'.$value.'%\''; |
|
| 1450 | } |
|
| 1451 | } |
|
| 1452 | if (!empty($temp_conditions)) { |
|
| 1453 | $sql_query .= implode(' '.$condition.' ', $temp_conditions); |
|