I have an array and I wrote this code which does not work. Could someone help me with this query? Thanks a lot!
$sql = "SELECT * FROM `product` WHERE `product`.`Productcode` IN (".$array.") ";
$result=mysql_query($sql);
if(!$result)die('not exist');
mysql_*
functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial. – STT LCU Jun 27 '13 at 9:27var_dump
on the$array
. – John V. Jun 27 '13 at 9:34