$sql_mem = 'SELECT members.firstname_th, members.lastname_th,members.address,tambon.tam_tname, province.prov_tname, country.country_tname,members.zipcode, members.mobile
FROM members,country,province,amphur,tambon
WHERE members.tam_id = tambon.tam_id
AND members.amp_id = tambon.amp_id
AND members.prov_id = province.prov_id
AND members.country = province.country_id
AND members.country = country.country_id
AND member_status = 1';