I know this is not really PHP, but mySQL and PHP kind of go hand in hand.
I’ve got 2 tables I’m joining together. One is a table for events, the other the dates for the events. One event may have many dates, but each date only has 1 event. Somewhat simple.
The problem after I join them, is if I select an event, it will display the same event several times. I’m only joining the dates so that I can narrow search results, but it will select event 2 or 3 times if it has 2 or 3 dates. How can I join so that it will only select the date one time.
Here is my query.
[CODE]SELECT *
FROM cvb_events LEFT JOIN cvb_events_dates on cvb_events.id = cvb_events_dates.event_id
WHERE ((title like ‘%$text%’) OR (description like ‘%$text%’)) AND (cvb_events.venue_id = ‘$venue_id’)
If I need to supply more information, just let me know.