This topic is locked

How can I select 2 tables for one View?

8/25/2007 1:37:19 PM
PHPRunner General questions
F
fsteves author

I currently have two tables with identical information that will be shown on ONE custom view page. How would I do this? I already modified the SQL query to ONLY show records from one table if they contain a boolean 1 for a certain field (This is the whole reason for the custom view) but I want to check another table for the same fields, and the same value and ALSO show those records.
Did that make sense?

Sergey Kornilov admin 8/25/2007

Are you talking about a query that pulls data from two tables at once?

F
fsteves author 8/26/2007

Yes, such as:
select `Event ID`,

`Event Name`,

`Event Year`,

`Event Description`,

`EventActive`

From `evac_events` AND `evac_oldevents` WHERE `Event Year` = '2007'

J
Jane 8/27/2007