Jump to content


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


[SOLVED] mysqli bind_param with array

Recommended Posts

baisicly i'm building the where part of the query up from an array... i pass trough the prepare() perfectly but then i get stuck...


this is what i've got now.. never thought it would work but had to try it

$marker = $stmt->param_count;
$type .= $stmt_bind['type'][$i];
$values .= $stmt_bind['value'][$i];
if ($i<$marker-1) { $values .= ', '; }
$stmt->bind_param($type, $values);


The error i expected to get and got

Warning: mysqli_stmt::bind_param() [mysqli-stmt.bind-param]: Number of elements in type definition string doesn't match number of bind variables in C:\wamp\www\framework\pel_lib\classes\mysql.class.php on line 77


Is there a way to solve this and still be using the array setup i've got?


I've checked all values and they return the right values...


Thanks in advance :)

Share this post

Link to post
Share on other sites

  • 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.