Is there a way to bind one parameter at a time in a mysqli_stmt object? i.e. something like,
// $stmt is a mysqli_stmt object.
// $bindvals is an array.
foreach ($bindvals as $item){
$stmt->bind_param('s',$item);
}
The above throws "Number of elements in type definition string doesn't match number of bind variables" (as long as count($bindvals)>1).
My ultimate goal in this particular case is to create a function that won't need to be edited whenever a column is added to a table, so something that will work for an indeterminate number of columns.