note 50570 deleted from function.implode by googleguy
| From: | googleguy@php.net | Date: | Sat, 19 Jan 2013 03:43:05 +0000 |
| Subject: | note 50570 deleted from function.implode by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-193228@lists.php.net to get a copy of this message | ||
Note Submitter: stefan
----
Even handier if you use the following:
<?php
$id_nums = array(1,6,12,18,24);
$id_nums = implode(", ", $id_nums);
$sqlquery = "Select name,email,phone from usertable where user_id IN ($id_nums)";
// $sqlquery becomes "Select name,email,phone from usertable where user_id IN
(1,6,12,18,24)"
?>