| @@ 252-256 (lines=5) @@ | ||
| 249 | $field = Database::escape_string($field); |
|
| 250 | $value = Database::escape_string($value); |
|
| 251 | $simple_like = false; |
|
| 252 | if ($simple_like) { |
|
| 253 | $temp_conditions[] = $field . " LIKE '$value%'"; |
|
| 254 | } else { |
|
| 255 | $temp_conditions[] = $field . ' LIKE \'%' . $value . '%\''; |
|
| 256 | } |
|
| 257 | } |
|
| 258 | $condition = ' AND '; |
|
| 259 | if (!empty($temp_conditions)) { |
|
| @@ 1479-1483 (lines=5) @@ | ||
| 1476 | foreach ($conditions as $field => $value) { |
|
| 1477 | $field = Database::escape_string($field); |
|
| 1478 | $value = Database::escape_string($value); |
|
| 1479 | if ($simple_like) { |
|
| 1480 | $temp_conditions[] = $field." LIKE '$value%'"; |
|
| 1481 | } else { |
|
| 1482 | $temp_conditions[] = $field.' LIKE \'%'.$value.'%\''; |
|
| 1483 | } |
|
| 1484 | } |
|
| 1485 | if (!empty($temp_conditions)) { |
|
| 1486 | $sql_query .= implode(' '.$condition.' ', $temp_conditions); |
|