how to get data from multiple tables in c