Re: MYSQL Trouble with the IN operator
| From: | CC Zona | Date: | Sun, 18 Mar 2001 21:13:24 +0000 |
| Subject: | Re: MYSQL Trouble with the IN operator | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-7580@lists.php.net to get a copy of this message | ||
In article <9937to$794$1@toye.p.sourceforge.net>,
nina_aloe@hotmail.com ("Jen") wrote:
> SELECT CONCAT(c.l_name, ", ", c.f_name) name
> FROM contractor c
> WHERE c.contractor_id NOT IN
> (select c.contractor_id
> FROM contractor c, task_assign t
> WHERE c.contractor_id = t.contractor_id
> AND t.task_id=11);
>
> It throws an error with the NOT IN line. I can replace the NOT IN with NOT
> IN(3) giving it a value, and that works. I was under the impression that
> you could put a query in the Not in.
That's a subquery. MySQL doesn't support subqueries (yet). See the manual.
--
CC