I have the following query that lists the latest 6 rows but the problem is idproduct 9 has new rows inserted more regularly so it means that one of the products wont be listed.PHP Code:
$query = ("SELECT *
ON operators.idoperators = products.idoperator JOIN results
ON products.idProducts = results.idproducts
WHERE (products.idProducts ='2'
OR products.idProducts ='5'
OR products.idProducts ='9'
OR products.idProducts ='10'
OR products.idProducts ='12'
OR products.idProducts ='13')
ORDER BY date DESC
How can I only show the newest row for each idProduct in the WHERE statement?