I am trying to make a notification list that displays notifications from multiple different content types and there respective database tables.for each content type There is a subscribe table with the respective subscriptions which I need to retrieve.the tables and there respective subscriptions tables are as follows
--------------------------
content type | subscriptions
-------------+------------
group | subscribegroup
-------------+------------
discussion | subscribediscussion
-------------+------------
forum | subscribeforum
-------------+------------
thread | subscribethread
-------------+------------
The problem I have is that each content subscription table has a different name for the id of its values eg
This is how I would get the data from one content a single table with its respective subscription table and then use UNION but isnt union heavy on the database server??
SELECT *
FROM thread t
JOIN subscribethread s ON (t.threadid = s.threadid)
WHERE userid= $currentuserid
How would I join multiple instances of other content types above with this? Thanks