Commit 484fd984 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge pull request #433 from deeky666/fix-mysqli-driver-bind-lob-values

Fix binding LOB values in mysqli driver prepared statement
parents f137925d 10a96cc2
......@@ -168,6 +168,9 @@ class MysqliStatement implements \IteratorAggregate, Statement
if (null === $this->_columnNames) {
$meta = $this->_stmt->result_metadata();
if (false !== $meta) {
// We have a result.
$this->_stmt->store_result();
$columnNames = array();
foreach ($meta->fetch_fields() as $col) {
$columnNames[] = $col->name;
......@@ -190,11 +193,6 @@ class MysqliStatement implements \IteratorAggregate, Statement
}
}
// We have a result.
if (false !== $this->_columnNames) {
$this->_stmt->store_result();
}
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment