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?
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?