[PHP] Using SELECT IN with arrays

2005-02-02 Thread W Luke
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 //??

Re: [PHP] Using SELECT IN with arrays

2005-02-02 Thread Jason Wong
On Thursday 03 February 2005 07:58, W Luke wrote: $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) 1) make both $d and $doms into array 2) use array_intersect() to find

Re: [PHP] Using SELECT IN with arrays

2005-02-02 Thread W Luke
On Thu, 3 Feb 2005 08:37:44 +0800, Jason Wong [EMAIL PROTECTED] wrote: $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) 1) make both $d and $doms into array 2) use