Re: Problems with implode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/3/24 Toke Herkild <th@xxxxxxxxxxx>:
> Hi All,
>
> I've an array() with approx 1200 items (list of id-mappings) that part works
> fine.
>
> Now I want to add this list to a query:
> $where = "id in (".$idList.")";
>
> To accomplish that i do an implode:
> $idList = implode(',', $TidList);


Are all of the Ids truly numeric?

You could try it that way:

$sql = "SELECT * from a where x IN('" . implode("', '", $array) . "')"

implode string = ', '

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux