MySQL error: SQLSTATE[HY000]: General error: 1021 Disk full (/tmp/#sql_4a0_1.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
SELECT T2.id FROM ( SELECT @r AS _id, (SELECT @r := parent_id FROM s_categories WHERE id = _id) AS parent_id, @l := @l + 1 AS lvl FROM (SELECT @r := ?, @l := 0) vars, s_categories h WHERE @r <> 0) T1 JOIN s_categories T2 ON T1._id = T2.id ORDER BY T1.lvl DESC