Re: Wildcard
| From: | richard dot mail at softhome dot net | Date: | Wed, 10 Jul 2002 10:26:49 +0000 |
| Subject: | Re: Wildcard | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-106747@lists.php.net to get a copy of this message | ||
why put in your query you want to look for an value .. if they don't want to look for it ?..
vins writes:
Shit..... Doesn't really make sense Sorry... I probably don't understand do you have an online example. "César aracena" <icaam@icaam.com.ar> wrote in message news:000101c227fb$74eed940$68ed0dd1@gateway... Hi all. I'm trying to figure out how to do a search trough a MySQL db using LIKE or = but the thing is that I have 3 select boxes from where to choose the search terms. Can I use something like a wildcard instead of making several IF statements like this? SELECT * FROM table_name WHERE col1 = value1 AND col2 = value2 AND col3 = % % goes for an unselected select box (default value = %) in case the user doesn't want to make an *advanced* search, so it fetches all rows which does contains values 1 & 2. Thanks, <mailto:webmaster@icaam.com.ar> Cesar Aracena CE / MCSE+I Neuquen, Argentina +54.299.6356688 +54.299.4466621 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php