Commit 47461b15 authored by Alexander Butenko's avatar Alexander Butenko

Merge pull request #296 from avbdr/master

close() prepared statement when its not needed anymore
parents 00824c1a 08295f04
......@@ -961,8 +961,11 @@ class MysqliDb
$x[$key] = $val;
}
$this->count++;
array_push($results, $x);
array_push ($results, $x);
}
if ($shouldStoreResult)
$stmt->free_result();
$stmt->close();
// stored procedures sometimes can return more then 1 resultset
if ($this->mysqli()->more_results())
$this->mysqli()->next_result();
......
......@@ -400,5 +400,6 @@ $db->delete("products");
//print_r($db->rawQuery("CALL simpleproc(?)",Array("test")));
print_r ($db->trace);
echo "All done";
echo "All done\n";
echo "Memory usage: ".memory_get_peak_usage()."\n";
?>
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