Search problem
| From: | virtualsoftware at gmail dot com | Date: | Sat, 21 May 2005 20:35:57 +0000 |
| Subject: | Search problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-215706@lists.php.net to get a copy of this message | ||
Hi,
I need to build up a search module for a shop. If I make a basic search (product title for example)
it is ok.
$query = "SELECT product_id FROM products WHERE title LIKE '%$title%'";
But i need an advance search for more than one field (title, description, price, weight)
The problem is that i don't know which field is filled in by the user (title, description,
price or weight)
I mean, the user can fill in all fields, or only price field, or title and weight etc
How can i do the search?
Thanks