The method you use to get the data is not relevant, it's the query string which is important.
To join two table you need a common field in both tables. For example consider a customer table and order table, the customer table holds information on your customer - customer number, name, address etc but the order table will just have a customerID field in. So to join them your SQL statement would be :
Select * from Customers, Orders
where Customer.CustomerNumber = Orders.CustomerID
Order by CustomerNumber, OrderNumber
Throw this at your database and await the information it send you back!