I have worked out, to send that field to the where query, i have to select the outer table again !! i dont think this is very efficient ?
select * from complaints, (SELECT IF (count(*) > 1,"Yes","No") AS count FROM complainant ccINNER JOIN complaints c ON cc.complainantID=c.complainantID WHERE c.complainantID IN(SELECT complainantID FROM complaints WHERE complaintID='.$_GET["complaintID"].')) AS countWHERE complaintID=$_GET['complaintID'] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]