Hi, can anyone tell me if there's anything wrong with this query?
$today = date("Ymd");
$query = "SELECT products, productid, COUNT(productid) AS count, DATE_FORMAT(date, '%Y%m%d') AS verbaldate FROM clicks GROUP by productid WHERE verbaldate = $today ORDER BY count DESC LIMIT 25";
I want to rank my products according to the number of times they appear in the database.
Table variables include: products, productid, and date.
Thanks in advance!