Jump to content

seach query proble


hamza

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.