Hi, i'm getting the following error when executing the following code. The count should be right
That line may now be 39 ( call_user_func_array() )I've tried hard coding the types too (so no extra comma)! And without array_values(), plus other things... and when I print each set of params out they are right
if(isset($_POST['order'])){
print "Order<br />";
$param=array();
$params="";
$params2="";
foreach($_POST as $k=>$v){
$pos = strpos($k, 'sku');
if($pos!==false&&$pos==0){
$param[]=$k;
$params.="s";
$params2.="?,";
}
}
if(count($param)>0){
print "Selecting<br />";
if($stmt = $db->prepare("SELECT sku, title, info, quant, cost FROM ".$db_table_prefix."product WHERE sku IN (".$params2.")")) {
call_user_func_array('mysqli_stmt_bind_param', array($stmt, $params, array_values(&$param)));
$stmt->execute();
Many thanks!