flush() public method

Kill cached query results.
Since: 0.71
public flush ( ) : void
return void
 /**
  * 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();
     }
 }
Beispiel #2
0
 /**
  * Kill cached query results
  */
 function flush()
 {
     $this->last_error = '';
     $this->num_rows = 0;
     parent::flush();
 }
Beispiel #3
0
 /**
  * Flush table.
  */
 public function flush()
 {
     $this->wpdb->flush();
 }