hierarchical data - Finding all parents in mysql table with single query on some condition -
next sql working:
select t2.id, t2.name ( select @r _id, (select @r := idparent objects id = _id) parent_id (select @r := 10) vars, objects m @r <> 0) t1 join objects t2 on t1._id = t2.id
but can find id doing query:
select id objects lower(name) lower('%prod%')
tell me how combine these queries
Comments
Post a Comment