$skuArray = array(00240=>123,00241=>456);
$getSkus = mysql_query("SELECT sku FROM data WHERE sku IN($skuArray)");
My above code doesn’t work, how can I make it SELECT all sku’s FROM data WHERE sku = any of the key names in $skuArray? (00240 and 00241 in this case)
Hope this makes sense, Thank You.
Try this:
You need to have the keys as strings and you then need to wrap them in parentheses for the SQL query.