|
Posted by Steve on 11/08/06 17:11
| $query .= explode(" AND ", $_POST);
|
| easy as that, however i assume given the lack of FIELD = VALUE in your
| example, that you are building a list. in that case, it is more efficient
to
| do:
|
| $query .= "WHERE someField IN ('" . explode("', '", $_POST) . "')";
ooops. correction (not to be confused with bickering, esp. with self ;^)
either:
$query .= explode(" AND ", array_values($_POST));
or:
$query .= "WHERE someField IN ('" . explode("', '", array_values($_POST)) .
"')";
Navigation:
[Reply to this message]
|