$sql = "SELECT m_id,SUM(o_qty) as qty,SUM(o_total) as price,(o_cost) as cost,(m_name) as name,(m_code) as mcode,(m_radio) as radio,(o_date) as date FROM orders natural join member where month(o_date) = '$month' AND year(o_date) = '$year' group by m_id order by qty desc limit 0,5";