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

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -