Deletes data by given conditions.
@access		public
@param		array	$where		associative Array of Condition Strings
@return		bool
547718
public function deleteByConditions( $where = array() ){
		$conditions	= $this->getConditionQuery( $where, FALSE, FALSE, FALSE );						//  render WHERE conditions, uncursored, without functions
		$query	= 'DELETE FROM '.$this->getTableName().' WHERE '.$conditions;
		$result	= $this->dbc->exec( $query );
		$this->defocus();
		return $result;
	}
740650
protected function prepareDelete($table, $where){
        $sql= 'DELETE FROM ' . $table . ' ';            
        if($where != ''){$sql.= " WHERE " . $where;}
        //Preparo la consulta y la retorno
        return  $this->connection->prepare($sql);
    }
1103427
public function delete($conditions = false)
    {
        $this->andWhere($conditions);
        $this->type = self::DELETE;
        return $this->execute();
    }
1050029
public function delete($table, array $conditions)
    {
        $table = $this->getTable($table);
        $where = $this->buildSqlObject($conditions, ' AND ');

        $query = "DELETE FROM $table WHERE " . $where;
        return $this->executeUpdate($query, array_values($conditions));
    }
1207646
protected function where($where)
    {
        foreach($where as $field => $value) {
            $this->queryBuilder->where($field, $value);
        }
    }
565918
public function delete($table, array $where)
    {
        $query = "DELETE FROM `$table` WHERE ";

        $bind = array();
        foreach ($where as $column => $value) {
            $query .= "`$column` = ? AND ";
            $bind[] = $value;
        }

        $query = substr($query, 0, -5);

        // Prepare, bind and execute
        $statement = $this->prepare($query);
        foreach ($bind as $idx => $value) {
            $statement->bindValue(($idx + 1), $value, Database::typeOfValue($value));
        }

        return $statement->execute();
    }
1139385
public function deleteBy($conditions = [])
    {
        if (count($conditions)) {
            if (method_exists($this, 'beforeDelete')) {
                $this->beforeDelete();
            }

            if (method_exists($this, 'beforeDelete')) {
                $this->beforeDelete();
            }

            if ($this->qb->table($this->table)->limit(1)->delete($conditions)) {
                if (method_exists($this, 'afterDelete')) {
                    return $this->afterDelete();
                }

                return $this->db->getAffectedRows();
            }
        }

        return false;
    }
911648
public function isOne(Array $where)
    {
        $param = '';
        foreach ($where as $key => $value) {
            if (is_int($key)) { //如果下标是数字，则不用下标拼装sql
                $param .= $value . ' AND ';
            } else {
                $param .= "$key='$value' AND ";
            }
        }
        $param = substr($param, 0, -4);
        $this->sql = "SELECT count(*) FROM { $this->_table } WHERE $param LIMIT 1";
        return $this->execute()->rowCount();
    }
815942
public function delete($where): Statement
    {
        $this->operation = 'delete';
        if ($where) {
            $this->where = $where;
        }
        return $this;
    }
1253809
public function delete($table, $where, $whereValue)
    {
        $query = $this->provider->buildDeleteQuery($table, $where, $whereValue);

        return $this->provider->query($query, null);
    }
1352993
public function delete($where): ?int
    {
        // 调用前置钩子
        $ret = $this->before('Delete', $where);

        //如果前置钩子阻止
        if ($ret === self::INTERRUPT) {
            return null;
        }

        //钩子对参数进行修正
        $where = array_pop($ret);

        //创建语句
        $this->statement->delete($where);

        // 执行具体删除操作
        $result = self::log('delete', ['where' => $where], '*', $where, true, false);

        // 如果存在后置钩子,则调用
        return intval($this->after('Delete', $result));
    }
312603
public function delete($table, array $where, $limit=0)
	{
        $tmp = array();

		$sql = "DELETE FROM {$table} WHERE " . $this->buildWhere($where, $tmp);

		if ($limit) {
			$sql .= " LIMIT ".(int)$limit;
		}

        $stmt = $this->prepare($sql);
        return $stmt ? $stmt->execute($tmp) : false;
	}
1063006
public function all($where)
    {
        $where = LambdaUtils::toConditionCallable($where);
        foreach($this as $record)
        {
            if(!call_user_func($where, $record))
            {
                return false;
            }
        }
        return true;
    }
1249912
public function delete(string $table, $where=''): ?PDOStatement
	{
		// Set the where clause
		if ( ! empty($where))
		{
			$this->where($where);
		}

		return $this->_run('delete', $table);
	}
1290524
public function restore($where = [])
    {
        $name = $this->getDeleteTimeField();

        if ($name) {
            if (false === $this->trigger('before_restore')) {
                return false;
            }

            if (empty($where)) {
                $pk = $this->getPk();
                if (is_string($pk)) {
                    $where[] = [$pk, '=', $this->getData($pk)];
                }
            }

            // 恢复删除
            $this->db(false)
                ->where($where)
                ->useSoftDelete($name, $this->getWithTrashedExp())
                ->update([$name => $this->defaultSoftDelete]);

            $this->trigger('after_restore');

            return true;
        }

        return false;
    }
194950
function delete(array $where, $returning = null) {
		$query = $this->getQueryWriter()->reset();
		$query->write("DELETE FROM", $this->conn->quoteName($this->name));
		$query->write("WHERE")->criteria($where);
		if (strlen($returning)) {
			$query->write("RETURNING", $returning);
		}
		return $this->execute($query);
	}
1230807
public function delete(array $where, $tableName = null)
    {
        $tableName = $tableName ?: $this->getTableName();
        $sql = $this->getSql();
        $delete = $sql->delete($tableName);

        $delete->where($where);

        $statement = $sql->prepareStatementForSqlObject($delete);

        return $statement->execute();
    }