RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting

Multiple queries within one php file

Join Date: Mar 2005
Location: Colorado
Posts: 50
Reputation: barnamos is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
barnamos's Avatar
barnamos barnamos is offline Offline
Junior Poster in Training

Re: Multiple queries within one php file

  #2  
May 8th, 2006
Seems like you could build your query according to what it entered. I take it you are having trouble because field 7 might be blank and you don't want to search for a blank field 7, you want to ignore field 7?

So just do a:
if ($_POST["gender"]) $qry.="gender='". $_POST["gender"]."',";
for each field.

Note the .= which keeps adding each part to the query.

Then trim the last comma off and use $qry as your query.

Good luck
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:19 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC