I have two tables that need to be output into an un-editable form. I need the syntax for the query.
TableOne has fields id, customer_id, date, type_id.
TableTwo has fields type_id, type_name.
SELECT * FROM TableOne WHERE customer_id=someVariable
just use LEFT JOIN or INNER JOIN
LEFT JOIN will give you all t1 even if you have no corresponding type_id in t2 INNER JOIN will only retrieve results where corresponding type_id exists in t1 and t2.
select t1.Id, t1.customer_id, t1.date, t2.type_name FROM TableOne t1 LEFT JOIN TableTwo t2 on t1.type_id = t2.type_id;