select * from h2harticle,h2hpage,h2hrevisions where h2hpage.a_id=h2harticle.a_id and h2hpage.p_id=h2hrevisions.p_id and r_active=1 and p_active=1 and h2harticle.a_id={a_id} order by h2hpage.p_order asc, h2hpage.p_id