you can use
Join Concept two get value from two table.
as I getting your question, you want to get data of two table based on single common matching value.
try this code
select e1.ticketno , e1.memberid,
e2.subject, e2.message,e2.attachment
from tbl_ticket e1 join
tbl_ticket_message e2
on e1.ticketno = e2.ticketno