filter search
| From: | Emiliano Boragina | Date: | Mon, 18 Apr 2011 19:48:44 +0000 |
| Subject: | filter search | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-47765@lists.php.net to get a copy of this message | ||
Hello,
I have an mysql database, with columns: id, name, day, month, year (this
last three birthdate), city,
I must to do a finder with filter.
This finder (or searcher) must can filter three thing: name, city and age.
I understand to do a finder with LIKE.
But I dont understand how or what I must to do to add the AND conditional,
and the WHERE.
I can do: query = "SELECT * FROM mydatabase WHERE name LIKE '%keyword%' AND
city LIKE '%keyword%' ORDER BY id DESC"
I dont know how to do the AGE part and the conditionals AND if the user can
search one or two or three filters.
Thanks a lot.
--
------------------------------------------
Emiliano Boragina
desarrollos + comunicación
------------------------------------------
+ 15 33 92 60 02
» emiliano.boragina@gmail.com
------------------------------------------
© 2011
------------------------------------------