Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#973 2024-10-01 09:27:38
Re: smd_gallery: super-flexible gallery generator
If it helps, in MySQL 8 you can use ROW_NUMBER()
function, plugging it into smd/etc_query:
SELECT * FROM (SELECT *, CEILING(ROW_NUMBER() OVER (ORDER BY date DESC)/10) AS page_num FROM `txp_image`) img WHERE category="sidebar-highlights" LIMIT 12
Offline
#974 2024-10-01 16:09:35
Re: smd_gallery: super-flexible gallery generator
etc wrote #337908:
If it helps, in MySQL 8 you can use
ROW_NUMBER()
function, plugging it into smd/etc_query:
SELECT * FROM (SELECT *, CEILING(ROW_NUMBER() OVER (ORDER BY date DESC)/10) AS page_num FROM `txp_image`) img WHERE category="sidebar-highlights" LIMIT 12...
Oh nice! Thank you, I will give this a try.
Last edited by maruchan (2024-10-03 01:24:12)
Offline