@param string $table
@param string $id

@return bool
423335
public function delete(string $table, string $id): bool
    {
        return $this->deleteWhere($table, 'id', $id);
    }
947199
public function has($id) {
		foreach($this->values as $container) {
			if($container->has($id)) {
				return true;
			}
		}
		return false;
	}
95154
public function rowSave($id, $data)
    {
        if (!$data || !is_array($data)) return false;

        if (is_null($id)) {
            $row = $this->getModel()->createRow();
        } else {
            $row = $this->getModel()->getRow($id);
        }

        if (!$row) return false;

        foreach ($data as $col => $value) {
            $row->$col = $value;
        }
        $row->save();

        if ($this->_columns) {
            $ret = array();
            foreach ($this->_columns as $c) {
                $ret[$c] = $row->$c;
            }
            return $ret;
        } else {
            return $row->toArray();
        }
    }
578847
public function existsId($id) {
        $count = $this->fetchCount(array($this->getDao()->getTableId() => $id));
        return $count > 0 ? true : false;
	}
597979
public function tryLoad(Model $m, $id, $table = null)
    {
        if (!isset($table)) {
            $table = $m->table;
        }

        if (!isset($this->data[$table][$id])) {
            return false; // no record with such id in table
        }

        return $this->typecastLoadRow($m, $this->data[$table][$id]);
    }
1248943
public function dbItem($table, $id, $key = 'id')
    {
        $result = Eresus_CMS::getLegacyKernel()->db->selectItem($this->__table($table),
            "`$key` = '$id'");

        return $result;
    }
689223
public function removeRow($id)
    {
        $returnValue = (bool) false;

        
		unset($this->rows[$id]);
		$returnValue = true;
        

        return (bool) $returnValue;
    }
703601
public function write($id, $data)
    {
        if (!$id) {
            return false;
        }
        $expires = time() + $this->_timeout;
        $record = compact('data', 'expires');
        $record[$this->_table->getPrimaryKey()] = $id;
        $result = $this->_table->save(new Entity($record));

        return (bool)$result;
    }
781617
public static function destroy($id)
    {
        $table = self::getTableNameFromClass();

        self::getOne($id);

        $query = "DELETE FROM $table WHERE id = ".$id;

        try {
            Connection::db()->query($query);
            return true;
        } catch (Exception $e) {
            return false;
        }
    }
474471
public function getFieldById($table, $field, $id, $id_col = 'id')
    {
        $options = array('W' => '`' . $id_col . "`='" . $this->escape($id) . "'");

        try {
            return $this->getField($table, $field, $options);
        } catch (\Exception $e) {
            Throw $e;
        }
    }
117893
public function removeColumn($id)
    {
        $returnValue = (bool) false;

        
		unset($this->columns[$id]);
		$returnValue = true;
        

        return (bool) $returnValue;
    }
320636
public function insert_id($table = '')
    {
        if (!$this->db_connected || $this->db_mode == 'r') {
            return false;
        }

        if ($table) {
            // resolve table name
            $table = $this->table_name($table);
        }

        $id = $this->dbh->lastInsertId($table);

        return $id;
    }
39815
public static function findById($id)
    {
        $data = X::app()->db->table(self::tableName())->findById($id, self::$pk);
        if(!$data){
            return false;
        }
        return new static($data,false);
    }
1082853
public function update( $id = false, $inputs = [] )
	{
		if( is_numeric($id) )
		{
			$update_inputs = [];
			$values = [];

			foreach( $inputs as $key => $value )
			{
				$update_inputs []= "`$key` = :$key";
				$values[":$key"] = $value;
			}

			$values[":id"] = $id;

			return $this->execute( "UPDATE `{$this->table}` SET " . implode(',',$update_inputs) . " WHERE `id` = :id" , $values );
		}
		return false;
	}
764948
public function delete($table_name, $id) {
            Event::dispatch(EventData::forBefore(Event::BEFORE_DELETE, $table_name, ['id' => $id]));
            $q = $this->config->getSystemIdentifierQuote();

            if (!$id || !$table_name) {
                return false;
            }

            $sql_query = 'DELETE FROM ' . $q . $table_name . $q . ' WHERE ' . $q . 'id' . $q . ' = :delete_id';
            try {
                //Run update query, collect stats
                $stmt = $this->db_connection->prepare($sql_query);
                $stmt->bindValue(':delete_id', $id);
                $stmt->execute();
            } catch (Exception $ex) {
                Event::dispatch(EventData::forException($ex, $sql_query, [':delete_id' => $id]));
                throw new QueryException($ex->getMessage(), $ex->getCode(), $ex);
            }
            $rows_affected = $stmt->rowCount();
            Event::dispatch(EventData::forAfter(Event::AFTER_DELETE, $table_name, [':delete_id' => $id], $sql_query, $rows_affected));

            return $rows_affected;
        }
954869
function Delete($id) {
		$this->LoadSchema();

		$data = array($this->schema['_id']['field'] => $id);

		$this->ResetQuery(array(
			'method' => 'delete',
			'table' => $this->table,
			'where' => array(
				$this->schema['_id']['field'] => $id,
			),
		));

		$this->Trigger('access', $data);
		if (!$this->continue)
			return FALSE;

		$this->Trigger('push', $data);
		if (!$this->continue)
			return FALSE;

		$this->Trigger('delete', $id);
		if (!$id)
			return FALSE;
		if (!$this->continue)
			return FALSE;

		$this->db->from($this->table);
		$this->db->where("{$this->table}.{$this->schema['_id']['field']}", $id);
		$this->db->delete();

		$this->Trigger('deleted', $id);
		return TRUE;
	}
204955
public function findById($id) {
    $dataConnection = $this->app->getDataConnection($this->connection);
    $result = $dataConnection->findOneByField($this->idColumn, $dataConnection->convertToNativeId($id),
      $this->table, $this->readFields);
    if ($result == NULL) {
      return FALSE;
    }
    $this->load($result);
    return TRUE;
  }