I am currently in the works of building a large database for events around the world. So far I've got the script working for one set of events and am trying to get the query set up for others.
Say I have event type1, type2, type3 all in different tables. And I have a query to get all of these events in one list with minimal information. When the event is clicked on it brings up all of the information for the event. The problem is that I can't figure out how to select the appropriate database to query that individual event.
This is my current query code for a single event type:
$get_event = $_GET['url'];
//MySQL Query
$query = "SELECT title, DATE_FORMAT(start_date, '%M %d'), DATE_FORMAT(end_date, '%M %d\, %Y'), city, state, state_long, description, site, site2, site3, email, contact, phone1, phone2, phone3, fax, vendor, monster
FROM type1
WHERE url='$get_event'";
Is it possible in a MySQL query to do "FROM type1 OR type2 OR type3" or something similiar (obviously this example won't work)? Or would it be better to set up another GET to select the appropriate database using
$get_event = $_GET['url'];
$get_db = $_GET['db'];
//MySQL Query
$query = "SELECT title, DATE_FORMAT(start_date, '%M %d'), DATE_FORMAT(end_date, '%M %d\, %Y'), city, state, state_long, description, site, site2, site3, email, contact, phone1, phone2, phone3, fax, vendor, monster
FROM '$get_db'
WHERE url='$get_event'";