Select tbl_domestic_details.title as tti,tbl_domestic.title as dtti,tbl_domestic.*,tbl_domestic_details.*,tbl_domestic_details.id as idm from tbl_domestic_details Inner join tbl_domestic on tbl_domestic_details.did=tbl_domestic.id where tbl_domestic_details.status='1' and tbl_domestic_details.isdeleted='1' AND tbl_domestic_details.did=''