php - SQL Select statement using array values -
i need select based on values in 1 of array key fields.
i have seen few similar questions answered using join didn't quite work me.
here's have far;
$sku = join("','", $itemrow["sellersku"]); $item_id =("select product_id ".db_products." product_code = ($sku);"); the error i'm getting is:
warning: join(): invalid arguments passed
solved:: in addition accepted answer worked;
i managed re-jigging statement , concatenating variable; ("select product_id ".db_products." product_code = ".$itemrow["sellersku"].";
instead, in , implode
try this-
$query= "select product_id ".db_products." product_code in (" . implode(',', $itemrow["sellersku"]) . ")";
Comments
Post a Comment