I currently have this
SELECT type, extra_id, COUNT(*) AS count, id
FROM `notifications`
WHERE `receiver_id` = '".$this->user_id."'
AND `read` = '0'
GROUP BY type, extra_id
ORDER BY `id` DESC
But this only orders by the first found result in the database as that’s what is taken when i SELECT id. how can i make this so it takes the last found ID from notifications to use in the SELECT id?
Just select
MAX(id)instead ofid: