|
Posted by ZeldorBlat on 11/08/06 17:49
Steve wrote:
> | $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)) .
> "')";
Wrong direction. Use implode in this case, not explode.
Navigation:
[Reply to this message]
|