Gossamer Forum
Quote Reply
Next / previous category
I just write a global to show previous(or last) and next(or first) category at the category page.
Because this is something essential i just ask myself if there is a function inside lsql to do this?

If not i will ask:

select 1 from with FatherID, order by asc, > than category.id
A B (C) > D* E
if not there select the first one.
A B C D (E) -> A*

select 1 from with FatherID, order by desc, > than category.id
E D (C) > B* A
if not there select the last one.
E D C B (A) -> E*

means that i need two or three selects, is there a better way?
Subject Author Views Date
Thread Next / previous category Robert 5003 Aug 3, 2016, 3:06 AM
Thread Re: [Robert] Next / previous category
Robert 4911 Aug 3, 2016, 4:25 AM
Thread Re: [Robert] Next / previous category
Robert 4918 Aug 3, 2016, 4:53 AM
Thread Re: [Robert] Next / previous category
Robert 4921 Aug 3, 2016, 5:01 AM
Thread Re: [Robert] Next / previous category
Robert 4908 Aug 3, 2016, 5:03 AM
Thread Re: [Robert] Next / previous category
Andy 4844 Aug 8, 2016, 1:54 AM
Post Re: [Andy] Next / previous category
Robert 4820 Aug 8, 2016, 2:59 AM