@param $what
@param $where

@return bool
516505
protected function isContain($what, $where)
    {
        if (empty($what)) {
            return true;
        }

        if (empty($where)) {
            return false;
        }

        if (strpos((string) $where, (string) $what) !== false) {
            return true;
        }

        return false;
    }
782124
public function delete($where) {
        $this->notifyObservers('beforeDelete', array($this, &$where));
        $result = parent::delete($where);
        $this->notifyObservers('afterDelete', array($this, $result, $where));
        return $result;
    }
701789
public function GetWhereCache($Where) {
      $Result = array();
      
      foreach (self::Categories() as $Index => $Row) {
         $Match = true;
         foreach ($Where as $Column => $Value) {
            $RowValue = GetValue($Column, $Row, NULL);
            
            if ($RowValue != $Value && !(is_array($Value) && in_array($RowValue, $Value))) {
               $Match = false;
               break;
            }
         }
         if ($Match)
            $Result[$Index] = $Row;
      }
      
      return $Result;
   }
948625
public function Delete($table, $where = null)
    {
        if (empty($table) || empty($where) && is_array($where)) {
            return false;
        }

        $delete = $this->queryFactory->newDelete();

        //Set the table from which the data is to be deleted
        $delete->from($table);

        //Set the where
        $delete->where($this->convertWhereToString($where));

        return $this->exec($delete->getStatement());
    }
400339
private function loadByWhere(array $where): Record
    {
        $this->_loaded = true;
        $this->_data = $this->_table->row('*', $where)->toArray();
        return $this;
    }
1147594
function orwhere($where)
    {
        $args = func_get_args();
        if (count($args) == 1)
        {
            $where = $args[0];
        }
        else
        {
            list($field, $expr, $value) = $args;
            $where = '`'.str_replace('`', '', $field).'`' . $this->db->quote($expr) . " '".$this->db->quote($value)."'";
        }

        if ($this->where == "")
        {
            $this->where = "where " . $where;
        }
        else
        {
            $this->where = $this->where . " or " . $where;
        }
    }
612035
public static function startsWith(?string $what, ?string $where): bool
    {
        // check is not empty string
        if (self::likeEmpty($what) || self::likeEmpty($where)) {
            return false;
        }

        $prefix = self::sub($where, 0, self::length($what));
        return $prefix === $what;
    }
927541
public function deleteWhere(array $wheres)
    {
        $query = $this->getSqlObject()
            ->delete()
            ->where($wheres);

        return $this->execute($query);
    }
1117110
public function GetCountWhere($Where = FALSE) {
      if (is_array($Where))
         $this->SQL->Where($Where);
         
      return $this->SQL->Select('CommentID', 'count', 'CountComments')
         ->From('Comment')
         ->Get()
         ->FirstRow()
         ->CountComments;
   }
450746
protected function seek($where = null)
    {
        if ($where === null) {
            return $this->count;
        }

        $this->count = $where;

        return true;
    }
456335
public function or_where()
	{
		$condition = func_get_args();
		is_array(reset($condition)) and $condition = reset($condition);

		return $this->_where($condition, 'or_where');
	}
485200
public function where($where = null, $value = null)
        {
            if (Arrays::is($this->where)) {
                $this->whereKey = count($this->where) + 1;
            }

            $this->where[$this->whereKey]['attr'] = $where;
            $this->where[$this->whereKey]['value'] = $value;

            return $this;
        }
1019549
final public function where(array $where, $type = 'and')
    {
        $where = self::configureClauses($where, $type);
        if ($this->where === null) {
            $this->where = $where;

            return $this;
        }

        if (isset($this->where[$type])) {
            $this->where[$type] = array_merge($this->where[$type], $where[$type]);
        } else {
            $this->where = $type == 'or'
                ? ['and' => array_merge($this->where['and'], [['or', $where['or']]])]
                : ['and' => array_merge($where['and'], [['or', $this->where['or']]])];
        }

        return $this;
    }
653985
public static function endsWith(?string $what, ?string $where): bool
    {
        // check is not empty string
        if (self::likeEmpty($what) || self::likeEmpty($where)) {
            return false;
        }

        $suffix = self::sub($where, -self::length($what));
        return $suffix === $what;
    }
1216589
public function remove($where=null)
    {
        $this->getQuery()->type('delete')->set('where', $where);
        
        $ret = $this->query();
        
        return $ret === false ? ErrorInfo::error('操作出错了') : ErrorInfo::success('删除成功', ['numberOfRows' => $ret]);
    }
1004277
public function delete(array $where = []) : bool {
    $this->query_builder->resetProperties();
    $this->query_builder->setMode('delete');

    if (!empty($where)) {
      $this->query_builder->setWhere($where);
      $where = $this->formatWhereData($where);
    }

    try {
      $stmt = parent::prepare($this->query_builder->getQuery());

      return $stmt->execute($where);
    } catch (PDOException $e) {
      $this->pdo_exception = $e;

      return false;
    }
  }
1185459
public static function delete($table, $where) {
        $delete = Delete::table($table);
        if (is_array($where)) {
            foreach ($where as $field => $value) {
                $delete->where($field, $value);
            }
        } else {
            $delete->where("id", $where);
        }
        return $delete->excuse();
    }