Hi,
I was hoping for some help.
I've been trying to get a search result linked to 2 tables.
It's currently outputing 8 results in the while() loop - it should only be 2.
If I do the queries separetely I get 4 results for the like result and 2 for the cid = results, so I assume this is why I get 8 results when combined (2 x 4 = 8).
This is my query, any idea what I'm doing wrong?
Thanks
$sql = "SELECT c4_products.pro_name, c4_categories_products.cid, c4_categories_products.pid FROM c4_products, c4_categories_products WHERE c4_products.pro_name LIKE '%".$_POST["search_name"]."%' AND c4_categories_products.cid = '".$catid."'";