Re: MYSQL Trouble with the IN operator

From: Date: Sun, 18 Mar 2001 21:24:03 +0000
Subject: Re: MYSQL Trouble with the IN operator
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-7581@lists.php.net to get a copy of this message
MySQL doesn't support nested selects. At 04:13 PM 3/18/01 -0500, Jen wrote:
Could someone please give their insight? I'm having trouble with this query... 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. Can someone please make a sugestion as to how this could be done without the NOT IN operator? Help is GREATLY appreciated!!
    Jen
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
########################################################## # Rick St Jean, # rstjean@internet.look.ca # President of Design Shark, # http://www.designshark.com/ # Quick Contact: http://www.designshark.com/messaging.ihtml # Tel: 905-684-2952 ##########################################################

« previous php.db (#7581) next »