0

I have a bit of an issue with my SQL statement. It is a bit hard to explain so I will show you:

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

The bit that doesn't work is the AND exp_channel_titles.channel_id = 19

Any ideas on how to solve this issue?

Thanks in advance!

1 Answer 1

6

You've joined on exp_channels.channel_id = exp_channel_titles.channel_id and are filtering on

exp_channels.channel_id = 18 
exp_channel_titles.channel_id = 19 

so there can never be any results

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.