MySQL: Query and join two tables

前端 未结 4 1766
灰色年华
灰色年华 2021-01-23 03:17

I have two tables that I believe I want to JOIN. I\'m very new to this and am not completely sure…

The first table is called venues with the variables <

4条回答
  •  清歌不尽
    2021-01-23 04:17

    try this

    SELECT venue.*, venue_terms.*
    FROM venue 
    INNER JOIN venue_terms ON venue.id = venue_terms.venue 
    WHERE venue_terms.option IN ( 1 ,2)
    AND venue_terms.value IN (10,4)
    GROUP BY venue.id
    

提交回复
热议问题