SELECT e.*, re.* FROM event e
LEFT OUTER JOIN event_recur re ON(e.eventID = re.eventID)
Since both table consist of the same column name e.eventID = re.eventID, if event_recur doesn’t have any record, my main e.eventID will be “overwritten” as NULL. For example:
+----------+--------------+----------+
| eventID | title | eventID | <--- this is from event_recur
+----------+--------------+----------+
| 112 | testing | NULL |
+----------+--------------+----------+
Is there any better way to prevent this instead of manually typing out all the individual columns?