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

javascript - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -