is ite possible to make an mysql query in which you get the latest 20 items AND the number of all the items, without using 2 queries. The less queries, the better, not? I need it for pagination.
SELECT item.* FROM #__gallery_items AS item ORDER BY created DESC LIMIT 0,20
Maybe the best is that each row has an extra column called ‘totalitems’, with the total number of items?
Is it possible and if yes, how? Thanks!
Two queries, it’s the only way ^^