0

我的 SQL 语句有点问题。这有点难以解释,所以我将向您展示:

SELECT  exp_channel_data.field_id_102,
        exp_channel_data.field_id_104,
        exp_channel_data.field_id_126,
        exp_channels.deft_status
FROM exp_channel_data
  INNER JOIN exp_channels
    ON exp_channels.channel_id = exp_channel_data.channel_id
  INNER JOIN exp_channel_titles
    ON exp_channels.channel_id = exp_channel_titles.channel_id
WHERE exp_channels.channel_id = 18
AND exp_channel_titles.channel_id = 19

不起作用的位是 AND exp_channel_titles.channel_id = 19

关于如何解决这个问题的任何想法?

提前致谢!

4

1 回答 1

6

您已加入exp_channels.channel_id = exp_channel_titles.channel_id 并正在过滤

exp_channels.channel_id = 18 
exp_channel_titles.channel_id = 19 

所以永远不会有任何结果

于 2012-06-18T08:55:58.613 回答