$sql = "SELECT DISTINCT products.product_id, products.product_name, products.short_desc, products.thumb_img FROM products, product_category_xref WHERE products.category_id='$category_id' AND products.publish='Y' || product_category_xref.category_id='$category_id' AND products.product_id=product_category_xref.product_id AND products.publish='Y' order by products.cat_pos, product_name asc LIMIT $position, $nresults";
Is there anyway of making this faster? It returns results correctly but it is painfully slow...
Thanks