haveOrUpdateInDatabase() public method

Inserts or updates a database entry on duplicate key.
public haveOrUpdateInDatabase ( string $table, array $data ) : void
$table string The table name.
$data array An associative array of the column names and values to insert.
return void
Esempio n. 1
0
 /**
  * Inserts or updates a database entry.
  *
  * An override of the parent method to allow back compatibililty and configuration based use.
  *
  * @param  string $table The table name.
  * @param  array $data An associative array of the column names and values to insert.
  *
  * @return void
  */
 public function javeInDatabase($table, array $data)
 {
     $this->debugSection('Configuration', sprintf('Update setting set to %s', $this->config['update']));
     if (isset($this->config['update']) and $this->config['update']) {
         return parent::haveOrUpdateInDatabase($table, $data);
     }
     return parent::haveInDatabase($table, $data);
 }