I have the following table structure in mySQL database - meetingdb
This is the table stucture:
tbl_event
eventid - primary key
eventdate
eventtime
eventplaceID - foriegn key for tbl_venue.venueid
eventplanID - foriegn key for tbl_companyplan.planid
tbl_venue
venueid - primary key
name
address
city
state
zip
tbl_companyplan
planid - primary key
company
plantype
I need to list the data output like this:
name
date - time
address
city, state zip
company plantype
I'd like to pull dates after "today" if I can and sort the data by City then Date then Time on the html page
First I think all I need is help with the FROM and WHERE syntax and then how I can select those dates (another WHERE?) greater than "today" I think I may have it.
Thank you for any help! I do this so little of this type of work... 8)
This is the table stucture:
tbl_event
eventid - primary key
eventdate
eventtime
eventplaceID - foriegn key for tbl_venue.venueid
eventplanID - foriegn key for tbl_companyplan.planid
tbl_venue
venueid - primary key
name
address
city
state
zip
tbl_companyplan
planid - primary key
company
plantype
I need to list the data output like this:
name
date - time
address
city, state zip
company plantype
I'd like to pull dates after "today" if I can and sort the data by City then Date then Time on the html page
Code:
SELECT tbl_event.eventdate,
tbl_event.eventtime,
tbl_venue.name,
tbl_venue.address,
tbl_venue.city,
tbl_venue.state,
tbl_venue.zip,
tbl_companyplans.company,
tbl_companyplans.plantype
FROM tbl_event (Join both tbl_venue and tbl_companyplan here???)
WHERE tbl_event.eventplaceID = tbl_venue.venueid || tbl_event.eventplanID = tbl_planid
ORDER BY 'city','state','eventdate','eventtime'
First I think all I need is help with the FROM and WHERE syntax and then how I can select those dates (another WHERE?) greater than "today" I think I may have it.
Thank you for any help! I do this so little of this type of work... 8)