def delete(self, table, **wheres):
        """
        This function will allow us to delete data from a given tables
        based on wether or not a WHERE clause is present or not
        """

        sql_str = "DELETE FROM `%s`.`%s`" % (self.database_name, table)

        if wheres is not None:
            first_where_clause = True

            for where, term in wheres.iteritems():
                if first_where_clause:
                    # This is the first WHERE clause
                    sql_str += " WHERE `%s`.`%s` %s" % (table, where, term)
                    first_where_clause = False
                else:
                    # this is the second (additional) WHERE clause so we use AND
                    sql_str += " AND `%s`.`%s` %s" % (table, where, term)
        sql_str += ";"

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