hamza Posted August 30, 2010 Share Posted August 30, 2010 here is my search query main table is deals. im using joins to match the selected field. the problem is that it is showing nothing.,in result SELECT * FROM `cs_deals` # Capital Type Joins INNER JOIN `cs_dealcapitaltype` ON cs_deals.deal_id = cs_dealcapitaltype.deal_id INNER JOIN `cs_capitaltype` ON cs_dealcapitaltype.capital_type_id = cs_capitaltype.capital_type_id # Industry Type INNER JOIN `cs_dealsindustry` ON cs_deals.deal_id = cs_dealsindustry.deal_id INNER JOIN `cs_industry` ON cs_industry.industry_id = cs_dealsindustry.industry_id # investment stages Joins INNER JOIN `cs_dealinvestmentstage` ON cs_deals.deal_id = cs_dealinvestmentstage.deal_id INNER JOIN `cs_investmentstage` ON cs_investmentstage.investmentstage_id = cs_dealinvestmentstage.investmentstage_id # min/max investment Joins -- INNER JOIN `` ON .deal_id = cs_dealinvestmentstage.deal_id WHERE cs_dealcapitaltype.capital_type_id LIKE '%1%' # Likeing in junction table AND cs_dealsindustry.deal_id LIKE '%36%' # Likeing in junction table AND cs_dealinvestmentstage.investmentstage_id LIKE '%5%' # Likeing in junction table AND cs_deals.capital_ammount LIKE '%2%' # Likeing in junction table Link to comment https://forums.phpfreaks.com/topic/212069-seach-query-proble/ Share on other sites More sharing options...
fenway Posted August 30, 2010 Share Posted August 30, 2010 Drop one inner join at a time, see what's failing. Link to comment https://forums.phpfreaks.com/topic/212069-seach-query-proble/#findComment-1105219 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.