I'm trying the method used to bind to all fields that's in the comments here: http://www.php.net/manual/en/function.m ... result.php (3rd comment down) but I get NULL on the &$array[$field->name]; part according to var_dump.
public function prep_bind_to_all(&$stmt)
{
$data = mysqli_stmt_result_metadata($stmt);
$count = 1; //start the count from 1. First value has to be a reference to the stmt. because bind_param requires the link to $stmt as the first param.
$fieldnames[0] = &$stmt;
while ($field = mysqli_fetch_field($data))
{
echo($field->name.'<br />');
$fieldnames[$count] = &$array[$field->name]; //load the fieldnames into an array.
$count++;
}
var_dump($fieldnames);
call_user_func_array(mysqli_stmt_bind_result, $fieldnames);
}