Re: confused about logic
| From: | Chris Boget | Date: | Fri, 19 Mar 2004 15:58:33 +0000 |
| Subject: | Re: confused about logic | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180973@lists.php.net to get a copy of this message | ||
> To enter multiple order numbers they can comma separate like:
> 1,34,21,34,54
> What I need to do is take those numbers and make a query that would like
> like:
> (cart_id in('1','34','21','34','54') OR id
> in('1','34','21','34','54'))
> ANY idea how I can accomplish this?
$string = "'" . implode( "', '", explode( ',',
'1,34,21,34,54' )) . "'";
echo "(cart_id in( $string ) OR id in( $string ))";
Chris