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 Quote 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. Quote Link to comment https://forums.phpfreaks.com/topic/212069-seach-query-proble/#findComment-1105219 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.