flush() public méthode

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