def update(self, table, where=None, **column_values):
        sql_str = "UPDATE `%s`.`%s` SET " % (self.database_name, table)

        if column_values is not None:
            for column_name, value in column_names.iteritems():
                sql_str += "`%s`=" % column_name

                # check how we should add this to the column string
                if is_number(value):
                    # it's a number so we don't add ''
                    sql_str += "%s, " % value
                else:
                    # it's a date or string so add the ''
                    sql_str += "'%s', " % value

        sql_str = sql_str[:-2] # strip off the last , and space character

        if where:
            sql_str += " WHERE %s" % where

        cusrsor = self.db.cursor()
        cursor.execute(sql_str)
        self.db.commit()
        cursor.close()