Horde_Db_Adapter_Base::delete PHP Method

delete() public method

Executes the delete statement and returns the number of rows affected.
public delete ( string $sql, mixed $arg1 = null, string $arg2 = null ) : integer
$sql string SQL statement.
$arg1 mixed Either an array of bound parameters or a query name.
$arg2 string If $arg1 contains bound parameters, the query name.
return integer Number of rows affected.
    public function delete($sql, $arg1 = null, $arg2 = null)
    {
        $this->execute($sql, $arg1, $arg2);
        return $this->_rowCount;
    }

Usage Example

Esempio n. 1
0
 /**
  * Erases all mapping entries for one combination of user, device ID.
  *
  * This is used during SlowSync so that we really sync everything properly
  * and no old mapping entries remain.
  *
  * @param string $databaseURI  URI of database to sync. Like calendar,
  *                             tasks, contacts or notes. May include
  *                             optional parameters:
  *                             tasks?options=ignorecompleted.
  */
 public function eraseMap($databaseURI)
 {
     $database = $this->normalize($databaseURI);
     $query = 'DELETE FROM horde_syncml_map ' . 'WHERE syncml_syncpartner = ? AND syncml_db = ? AND ' . 'syncml_uid = ?';
     $values = array($this->_syncDeviceID, $database, $this->_user);
     $this->_db->delete($query, $values);
 }
All Usage Examples Of Horde_Db_Adapter_Base::delete