好的,有点麻烦;任何援助都将受到极大的赞赏。
因此,当我在单独的尝试中执行时,我的两个内连接语句都在查询中工作,但我确实需要两个语句才能工作,因为我从两个不同的表中调用数据,而不是从我收集数据的主要表。
SELECT
`conferences_form_records`.`id`,
`conferences`.`conf_name`,
`events`.`event`
FROM `conferences_form_records`
inner join `conferences`
on `conferences_form_records`.`conference`
where `conferences_form_records`.`conference`=`conferences`.`id`
inner join `events`
on `conferences_form_records`.`relay`
where `conferences_form_records`.`relay`=`events`.`id`
我希望这足以简化提供的信息。
答案 0 :(得分:2)
试试这个......看看它是否让你更接近你想去的地方......
SELECT cfr.id
, c.conf_name
, e.event
FROM conferences_form_records cfr
JOIN conferences c
ON c.id = cfr.conference
JOIN events e
ON e.id = cfr.relay;