SELECT MIN(mess.cat_level) as level
FROM class_relation AS cr
JOIN relation r ON r.id_class_relation = cr.id
AND r.id_parent = '0'
JOIN message_85 mess ON mess.id = r.id_child
WHERE cr.id_parent_class = '84'
AND cr.id_child_class = '85' SELECT MIN(mess.cat_level) as level , mess.id
FROM class_relation AS cr
JOIN relation r ON r.id_class_relation = cr.id
AND r.id_parent = '0'
JOIN message_85 mess ON mess.id = r.id_child
WHERE cr.id_parent_class = '84'
AND cr.id_child_class = '85' SELECT cat_level FROM message_85 WHERE id= SELECT A.id FROM message_85 A, message_85 B
WHERE B.id=''
AND B.cat_left BETWEEN A.cat_left AND A.cat_right
AND A.cat_level = 0
AND A.cat_level <= ORDER BY A.cat_left LIMIT 1 SELECT A.*, IF (A.cat_left+1 < A.cat_right, 1, 0) AS nflag FROM message_85 A, message_85 B
WHERE B.id=''
AND B.cat_left BETWEEN A.cat_left AND A.cat_right
AND A.cat_level > 0
AND A.cat_level <=
AND A.id <> ORDER BY A.cat_left SELECT A.*, IF (A.cat_left+1 < A.cat_right, 1, 0) AS nflag FROM message_85 A, message_85 B WHERE B.id='' AND A.cat_left >= B.cat_left AND A.cat_right <= B.cat_right AND (A.cat_level < B.cat_level+) AND A.id <> ORDER BY A.cat_left SELECT A.*, IF (A.cat_left+1 < A.cat_right, 1, 0) AS nflag FROM message_85 A, message_85 B WHERE B.id='' AND A.cat_left >= B.cat_left AND A.cat_right <= B.cat_right AND (A.cat_level < B.cat_level+) AND A.id <> ORDER BY A.cat_left
|
|
|
|
test1 27.05.00
test1111111 111111 111111 |
|
|
|
30.11.99
|
|
30.11.99
|
no relation between parent class [] and child class []
|
|
|