hi,
thank you for the prompt reply.
can you please guide me.... i do know that i would need to recode but i've tried modifying the sql query that is sent but had no success.
PHP Code:
$where_str = " WHERE (p.products_status = 1
AND p.products_id = pd.products_id
AND pd.language_id = :languagesID
AND p.products_id = p2c.products_id
AND cd.categories_id = c.categories_id
AND p2c.categories_id = c.categories_id ";
because there is a statement - " AND p2c.categories_id = c.categories_id " which is the main one that would not allow A/DD to return results. I have added the statement "AND cd.categories_id = c.categories_id" so that when BB/CC/EE are searched their respective products are displayed.
To help the latter i also added the category description table in the query since it contains the name of the categories
PHP Code:
$from_str = "FROM (" . TABLE_PRODUCTS . " p
LEFT JOIN " . TABLE_MANUFACTURERS . " m
USING(manufacturers_id), " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd, " .
TABLE_PRODUCTS_TO_CATEGORIES . " p2c )
LEFT JOIN " . TABLE_META_TAGS_PRODUCTS_DESCRIPTION . " mtpd
ON mtpd.products_id= p2c.products_id
AND mtpd.language_id = :languagesID";
and then added " OR cd.categories_name LIKE '%:keywords%' " to allow for BB/CC/EE to return results.
PHP Code:
$where_str .= "(pd.products_name LIKE '%:keywords%'
OR p.products_model
LIKE '%:keywords%'
OR m.manufacturers_name
LIKE '%:keywords%'
OR cd.categories_name
LIKE '%:keywords%'";
thanks