Alerts Table:
alertId, col1, col2, col3
Msgs Table:
alertId, MsgId
Comments Table:
Msgid, col1, col2, col3, col4
Is there a way to build just one query that grabs
all columns/records from the alerts table for "col1 > 1", AND
all columns from the comments table for that record's corresponding AlertId/MsgId from the Msgs table?
Right now I am looping through the query of the alerts table and querying the comments table, but that is too slow.
alertId, col1, col2, col3
Msgs Table:
alertId, MsgId
Comments Table:
Msgid, col1, col2, col3, col4
Is there a way to build just one query that grabs
all columns/records from the alerts table for "col1 > 1", AND
all columns from the comments table for that record's corresponding AlertId/MsgId from the Msgs table?
Right now I am looping through the query of the alerts table and querying the comments table, but that is too slow.