/**
* If you do not iterate over all the rows returned, be sure to call this function
* on all remaining rows to free resources.
* @return void
*/
public function freeResult()
{
if ($this->mysqlResults) {
if ($this->useMysqli) {
if ($this->debug) {
mysqli_free_result($this->mysqlResults);
} else {
@mysqli_free_result($this->mysqlResults);
}
} else {
if ($this->debug) {
mysql_free_result($this->mysqlResults);
} else {
@mysql_free_result($this->mysqlResults);
}
}
$this->mysqlResults = null;
$this->wpdb->flush();
}
}