Hi. I'm trying to execute a query which does a SELECT IN on an array...here's how it stands: $doms = implode( "','", $domarray ); $d=$_GET['d'] $qmailsql = "SELECT mq.id, mq.user, mq.domain, mq.sender, mq.arrive_time, mq.subject, mq.body_preview, mq.relay FROM mail_quarantine AS mq WHERE //?? ORDER BY mq.arrive_time DESC LIMIT 50"; $doms is a "master array" of a user's domains. $d is a comma-seperated and unexploded list of domains to filter the SELECT down with. (error checking is already in place) So basically I need to find *all* domains in $d (dom1.com,dom2.net) which appear in $doms, then extract all the other info (mq.user,mq.sender etc). I've spent all day trying to work it out, but I think my *logic* is wrong...any ideas much appreciated Thanks -- Will The Corridor of Uncertainty http://www.cricket.mailliw.com/ - Sanity is a madness put to good use - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php