| @@ 153-157 (lines=5) @@ | ||
| 150 | $sql_query = "SELECT * FROM $user_table"; |
|
| 151 | if (count($conditions) > 0) { |
|
| 152 | $sql_query .= ' WHERE '; |
|
| 153 | foreach ($conditions as $field => $value) { |
|
| 154 | $field = Database::escape_string($field); |
|
| 155 | $value = Database::escape_string($value); |
|
| 156 | $sql_query .= $field.' LIKE \''.$value.'%\''; |
|
| 157 | } |
|
| 158 | } |
|
| 159 | $order = ''; |
|
| 160 | foreach ($order_by as $orderByItem) { |
|
| @@ 373-377 (lines=5) @@ | ||
| 370 | $sqlConditions = null; |
|
| 371 | if (!empty($conditions)) { |
|
| 372 | $temp_conditions = array(); |
|
| 373 | foreach ($conditions as $field => $value) { |
|
| 374 | $field = Database::escape_string($field); |
|
| 375 | $value = Database::escape_string($value); |
|
| 376 | $temp_conditions[] = $field.' LIKE \'%'.$value.'%\''; |
|
| 377 | } |
|
| 378 | if (!empty($temp_conditions)) { |
|
| 379 | $sqlConditions .= implode(' AND ', $temp_conditions); |
|
| 380 | } |
|