mysql - Can I use two 'JOIN's in a single call? -


i'm trying call 3 different tables @ once.

table a has general data.

table td & dmd have specific data data points.

my call (simplified) looks this.

select a.*, td.*, dmd.*  activities a, tweet_activity_data td, direct_message_activity_data dmd  a.activity_id in (1,2,3,4,5)  , a.activity_id = dmd.id  , a.activity_id = td.tweet_id 

those last 2 lines i'm having trouble think.

i need things line in response , produces no results.

am 'allowed' use 2 joins in sql call?

yes, join tables use join , on keyword. specifically, stuff in clause end on clauses, telling query how join tables. query

select a.*, td.*, dmd.* activities join tweet_activity_data td   on a.activity_id = td.tweet_id join direct_message_activity_data dmd   on , a.activity_id = dmd.id a.activity_id in (1,2,3,4,5) 

Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -