Re: Re: Wildcards
| From: | Ashley M. Kirchner | Date: | Mon, 06 May 2002 20:59:45 +0000 |
| Subject: | Re: Re: Wildcards | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18996@lists.php.net to get a copy of this message | ||
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.
--
W | I haven't lost my mind; it's backed up on tape somewhere.
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:ashley@pcraft.com> .
303.442.6410 x130
IT Director / SysAdmin / WebSmith . 800.441.3873 x130
Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6
http://www.pcraft.com ..... . . . Boulder, CO 80303,
U.S.A.