public function delete($table, $where = null)
    {
        $sql = "DELETE FROM `$table`";

        if (!is_null($where)) {
            $sql .= " WHERE $where";
        }

        return $this->query($sql);
    }