I'm trying to do a select statement that will allow me to actually return the parent category_id from a tree traversal. I know that this is not typically how it's done, but I need to know the parent id for this JavaScript I want to use..
Thanks a lot!
tree traverse - actually get parent_id
Moderator: General Moderators
something like this may work:
Code: Select all
select id
from tree
where `left` < $nodeLeft
order by `left` desc
limit 1,1