| @@ 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)) { |
|
| @@ 1448-1452 (lines=5) @@ | ||
| 1445 | foreach ($conditions as $field => $value) { |
|
| 1446 | $field = Database::escape_string($field); |
|
| 1447 | $value = Database::escape_string($value); |
|
| 1448 | if ($simple_like) { |
|
| 1449 | $temp_conditions[] = $field." LIKE '$value%'"; |
|
| 1450 | } else { |
|
| 1451 | $temp_conditions[] = $field.' LIKE \'%'.$value.'%\''; |
|
| 1452 | } |
|
| 1453 | } |
|
| 1454 | if (!empty($temp_conditions)) { |
|
| 1455 | $sql_query .= implode(' '.$condition.' ', $temp_conditions); |
|