Jump to content

Warning: mysqli_stmt::bind_param() [mysqli-stmt.bind-param]


cypher86

Recommended Posts

attention  please i've finally work it out.

 

while (list($chiave,$val) = each($_POST)){
		if($val!=""){
			$fragments[] = $chiave." = ?";
			//echo $chiave;
			if($chiave=="ritiro" or $chiave=="data")
				$params[] = normalToDbDate($val);
			else
				$params[] = $val;
			if($chiave=="legale")
				$type[]='i';
			else
				$type[]='s';
		}
	}

	$prova=implode("",$type);
	foreach($params as $param)
		echo "<p>".$param."</p>";
	//echo "val(".count($params).")-->".implode(',',$params);
	//echo "type(".strlen($prova).")-->".implode("",$type);
	$sql = $db->prepare(".................. AND ".implode(" AND ", $fragments));
	array_unshift($params,$prova);
	//print_r($params);
	$tmp = array();
        foreach($params as $key => $value) $tmp[$key] = &$params[$key];

	print_r($tmp);
       	call_user_func_array( array( $sql, 'bind_param' ),$tmp);
	//$sql->bind_param($prova,$params);
	$sql->execute();

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.