Create Search engine with multiple form fields

From: Date: Sun, 29 Jun 2008 15:07:00 +0000
Subject: Create Search engine with multiple form fields
Groups: php.db 
Request: Send a blank email to php-db+get-45114@lists.php.net to get a copy of this message
Hi,   I have an HTML form which has more then one fields. User can precise its search using one or more input fields E.g GigName,Date, Genre,Venue. The data is coming from 3 tables.  Below Query brings one tables record with each and every row of other two tables. Could any one please help me sort out the query.   select * FROM gig g, venue v, genre ge  WHERE g.gigName LIKE '%".$gig_name."%' OR g.gig_date LIKE '%".$sdate."%' OR ge.name LIKE '%".$genre."%' OR g.ticket_price LIKE '%".$ticket_price1."%' OR g.ticket_price LIKE '%".$ticket_price2."%' OR v.venueName LIKE '%".$vname."%'"   If I replace OR with AND I dont get any result.     Regards   Nasreen

« previous php.db (#45114) next »