Re: [suspicious - maybe spam] [PHP] [suspicious - maybe spam] SELECT probrem

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

 



Hello Phpu,

Thursday, January 6, 2005, 10:42:15 AM, you wrote:

P> I have an array, for ex: $products=array(1, 2,  5 , 7)
P> I want to select all products from the database that has the ids of products.
P> I use this but doesn't work:

$product_ids = implode(',', $products);
$sql = "SELECT product_name FROM accessories WHERE product_id IN ($product_ids)";

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 "I am not young enough to know everything." - Oscar Wilde

-- 
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