Delete rows
@param string $where
@param array $params
@param string $limit
@param string $order
@return boolean
976284
public function delete($where = null, $params = [], $limit = null, $order = null) {

		if(null === $this -> getAdapter()) {
			return trigger_error(sprintf('No database adapter was set in "%s"', __METHOD__), E_USER_ERROR);
		}

		if(null !== $where && false === is_string($where)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($where)), E_USER_ERROR);
		}

		if(false === is_array($params)) {
			return trigger_error(sprintf('Argument 2 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($params)), E_USER_ERROR);
		}

		if(null !== $limit && false === is_string($limit)) {
			return trigger_error(sprintf('Argument 3 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($limit)), E_USER_ERROR);
		}

		if(null !== $order && false === is_string($order)) {
			return trigger_error(sprintf('Argument 5 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($order)), E_USER_ERROR);
		}

		//Select
		$query[] = sprintf('DELETE FROM %s', $this -> getAdapter() -> escape($this -> getTable()));

		//Where
		if(null !== $where) {
			$query[] = sprintf('WHERE %s', $this -> getAdapter() -> escape($where));
		}

		//Order
		if(null !== $order) {
			$query[] = sprintf('ORDER BY %s', $this -> getAdapter() -> escape($order));			
		}

		//Limit
		if(null !== $limit) {
			$query[] = sprintf('LIMIT %s', $this -> getAdapter() -> escape($limit));
		}

		return $this -> getAdapter() -> query(implode(' ', $query), $params) -> execute();
	}
640251
final public function delete( array $where, $table = '', $place_holders = [] ) {
		if ( ! $place_holders ) {
			try {
				$place_holders = $this->get_place_holders( $where );
			} catch ( \Exception $e ) {
				return false;
			}
		}
		return $this->db->delete( $table ?: $this->table, $where, $place_holders );
	}
1253809
public function delete($table, $where, $whereValue)
    {
        $query = $this->provider->buildDeleteQuery($table, $where, $whereValue);

        return $this->provider->query($query, null);
    }
1178724
public function delete($where, $table = null)
    {
        $table = ($table) ?: $this->getTable();
        $sql = $this->getSql();
        $delete = $sql->delete($table);

        $delete->where($where);

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

        return $result->getAffectedRows();
    }
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;
	}
889601
public function GetDelete($Table, $Where, &$Data) {
      if (is_array($Data)) {
         // Grab the records.
         $Result = $this->SQL->GetWhere($Table, $Where)->ResultArray();
         
         if (empty($Result))
            return;
         
         // Put the records in the result array.
         if (isset($Data[$Table])) {
            $Data[$Table] = array_merge($Data[$Table], $Result);
         } else {
            $Data[$Table] = $Result;
         }
      }
      
      $this->SQL->Delete($Table, $Where);
   }
104084
public function deleteWhere($conditions, $_=null)
    {
        $query = $this->db->deleteFrom($this->entity->getTable());
        return call_user_func_array([$query, 'where'], func_get_args());
    }
1374296
public function delete($table, array $where)
    {
        $keys = array_keys($where);
        $values = array_values($where);

        $replace = function ($key) { return $key . "=?"; };

        $where = implode(' AND ', array_map($replace, $keys));

        $sql = "DELETE FROM {$table} WHERE {$where}";

        return $this->query($sql, $values);
    }
1292686
public function delete($where = [], $limit = null)
    {
        $this->where($where);

        if (isset($limit)) {
            $this->limit($limit);
        }

        return $this->platformDeleteHandler($this->builderCache);
    }
910522
public function deletePDO($table, array $where = array(), $limit = 1)
    {
        $limit = (int)$limit;
        if (count($where) === 0) {
            return false;
        }
        $q = "DELETE FROM `$table` ";
        $q .= 'WHERE ';
        foreach ($where as $key => $val) {
            if (empty($val)) {
                continue;
            } else {
                $q .= "`$key`=? AND ";
            }
        }
        $q = rtrim($q, 'AND ');
        if ($limit > 0) {
            $q .= ' LIMIT ' . $limit . ' ;';
        } else {
            $q .= ' ;';
        }
        try {
            $this->_queryId = self::$_linkId->prepare($q);
            $i = 1;
            foreach ($where as $key => $val) {
                if (empty($val)) {
                    continue;
                } else {
                    $type = $this->getPDOConstantType($val);
                    $this->_queryId->bindValue($i, $val, $type);
                    ++$i;
                }
            }
            return $this->_queryId->execute();
        } catch (PDOException $e) {
            $this->_error = $e->getMessage();
            return false;
        }
    }
767368
public function deleteFrom(string $table, array $where): int
    {
        $delete = new Delete($this->options);
        $sqlParams = $delete->buildQuery($table, $where);
        return $this->query($sqlParams->getSql(), $sqlParams->getParams())->getAffected();
    }
992700
final public static function where(array $criteria, array $orderBy = ['createdAt' => 'DESC'], int $limit = null, int $offset = null, bool $withTrash = false)
    {
        $criteria = self::criteriaWithSoftDelete($criteria, $withTrash);
        return static::getRepository()
            ->findBy($criteria, $orderBy, $limit, $offset);
    }
180269
public function getDeleteSQL($from, $joins, $where, $values, $order, $limit) {
        $len = count($joins);
        if ($len == 0) {
            $sql [] = 'DELETE FROM ' . $from [0][0];
        } else {
            $sql [] = 'DELETE ' . $from[0][1] . ' FROM ' . implode(' AS ', $from [0]);
            foreach ($joins as $join) {
                $sql [] = $join [2] . ' ' . $join [0] . ' AS ' . $join [3] . ' ON (' . $join [1] . ')';
            }
        }

        if ($where && count($where) > 0) {
            $sql [] = 'WHERE';
            $sql [] = $where->getWhereCondition($this, $values);
        }
        if ($len == 0) {
            if ($order) {
                $_orders = [];
                foreach ($order as $o) {
                    $_orders [] = Condition::cleanField($o [0]) . ' ' . ($o [1] == 'a' ? 'ASC' : 'DESC');
                }
                $sql [] = 'ORDER BY ' . implode(' , ', $_orders);
            }
            if ($limit) {
                $limit2 = $values->addValue('limit', $limit [1]);
                $sql [] = 'LIMIT ' . $limit2;
            }
        }

        return implode(' ', $sql);
    }
41358
public static function delete($table, $where = null) {
        if ($where) {
            Delete::delete($table, $where);
        } else {
            return Delete::table($table);
        }
        return null;
    }
1106813
public function delete($table, $where = [], array $bind = [])
    {
        $table = $this->quote()->identifier($table);
        $sql   = "DELETE FROM $table";
        if (is_array($where)) {
            $where = $this->createWhereExpression($where);
        }
        $sql .= (($where) ? " WHERE {$where}" : '');

        $stmt = $this->query($sql, $bind);

        return $stmt->rowCount();
    }
1212951
public function getByOrder(string $orderBy, array $where = [], array $with = [], string $order = 'desc', int $limit = 0)
    {
        $query = $this->make($with);

        $query = $this->applyWhere($query, $where);

        $query = $query->orderBy($orderBy, $order);

        if ($limit) {
            $query = $query->take($limit);
        }

        return $query->get();
    }
555146
public function delete($table, $where, $bind = "")
    {
        $sql = "DELETE FROM " . $table . " WHERE " . $where . ";";
        return $this->run($sql, $bind);
    }