Joint two table query
$t_query="select a.id,a.memberid as memberid,a.commission,a.calmemberleft ,a.calmemberright,a.totalmembers,a.totalbalance, a.previousreleased,a.presentcommission,a.totalreleased,a.tleftmembers,a.trightmembers,a.date,b.id as mid,b.block,b.username,b.city,b.ledgerid,b.referid,b.emailid from ".COMMISSION1." a , ".MEMBER." b where (a.memberid=b.ledgerid and b.block='') order by a.id desc";