> Morten Nielsen wrote:
> > It is because it is a search function where a user can enter an
> ID, NAME and
> > ADDRESS to search after. If one of the fields are empty it
> should use the
> > wildcard.
> Then while you're constructing the search string, evaluate
> whether that
> field is empty or not (isset() should work fine for this). If
> it's empty, stick
> '%' in the string, otherwise use the variable contents.
Actually if it's empty it would be better just to omit the field from being
part of the WHERE condition at all =) But excellent advice
nonetheless...much better than what I was going to suggest =)
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php