| @@ 196-200 (lines=5) @@ | ||
| 193 | $field = Database::escape_string($field); |
|
| 194 | $value = Database::escape_string($value); |
|
| 195 | $simple_like = false; |
|
| 196 | if ($simple_like) { |
|
| 197 | $temp_conditions[] = $field . " LIKE '$value%'"; |
|
| 198 | } else { |
|
| 199 | $temp_conditions[] = $field . ' LIKE \'%' . $value . '%\''; |
|
| 200 | } |
|
| 201 | } |
|
| 202 | $condition = ' AND '; |
|
| 203 | if (!empty($temp_conditions)) { |
|
| @@ 1434-1438 (lines=5) @@ | ||
| 1431 | foreach ($conditions as $field => $value) { |
|
| 1432 | $field = Database::escape_string($field); |
|
| 1433 | $value = Database::escape_string($value); |
|
| 1434 | if ($simple_like) { |
|
| 1435 | $temp_conditions[] = $field." LIKE '$value%'"; |
|
| 1436 | } else { |
|
| 1437 | $temp_conditions[] = $field.' LIKE \'%'.$value.'%\''; |
|
| 1438 | } |
|
| 1439 | } |
|
| 1440 | if (!empty($temp_conditions)) { |
|
| 1441 | $sql_query .= implode(' '.$condition.' ', $temp_conditions); |
|