Paul Nowosielski <[EMAIL PROTECTED]> wrote on 01/11/2006 02:41:05
PM:
> Hello,
>
> I'm trying to run q query with an IN statement in MySQL 5. Like so:
>
> SELECT * from encore enc, article art
> WHERE enc.encore_id= '10' AND `article_id` IN (`articles`)
>
> Its should return all the articles
Paul,
SELECT * from encore enc, article art
WHERE enc.encore_id= '10' AND `article_id` IN (`articles`)
First, IN() accepts either a literal value list, or a subquery which
returns a value list. Just passing it a table name won't work.
Second, your join looks suspicious. Is this what you mean
Your select has two tables, but you don't join them.
Can you provide the table info, and a subset of the data that should be
pulled back by this query?
David
Paul Nowosielski wrote:
Hello,
I'm trying to run q query with an IN statement in MySQL 5. Like so:
SELECT * from encore enc, articl
Hello,
I'm trying to run q query with an IN statement in MySQL 5. Like so:
SELECT * from encore enc, article art
WHERE enc.encore_id= '10' AND `article_id` IN (`articles`)
Its should return all the articles in the encore.articles column but
instead only returns the first article.
In encore,art