melting_dog Posted January 9, 2012 Share Posted January 9, 2012 Hi all, I have a site that displays a product, then shows similar products based off the name of the first (like a 'You might also like...' list). However the original product keeps appearing in this similar product list. I need a way to exclude that product. You can see this here: http://adamsherman.com.au/postureperfection/product-page/?prodid=3 Notice how the Reno Stool also appears in the suggested items list. Can anyone help me out? Heres the SQL: $sql = "SELECT * FROM product WHERE " . implode(' OR ', $searchTerms) . " AND product_id != '$prodid' LIMIT 3"; The .implode() just splits up the name of the item whilst $prodid is the items unique identifier. I have also tried NOT LIKE, <> and != $productname as well. Any help would be much appreciated. Thanks! Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.