def select_entries(self, table, where_dict={"'1'":"1"}, operator="AND", order_field="id", order="ASC"):
        """ A wrapper for the SQL SELECT operation. It will always return all the 
            attributes for the selected rows.
        @param table: The table to search to
        @param whereDict: A dictionary with the WHERE clauses. If ommited it will 
        return all the rows of the table
        """
        self._connect_to_db()
        with self.con:
            cur = self.con.cursor()
            first = True
            for key, value in where_dict.iteritems():
                if first: 
                    where_part = "%s = '%s'" % (key, value)
                    first = False
                else:
                    where_part = where_part + (operator, key, value) % "%s %s = '%s'"
            query = "SELECT * FROM %s WHERE %s ORDER BY %s %s" \
                    % (table, where_part, order_field, order)
            #self._log.info("query: %s "% query)
            cur.execute(query)
            rows = cur.fetchall()                
        self._disconnect_from_db()
        return rows
dataset/ETHPy150Open sophron/BAR/bar/common/db.py/Bardb.select_entries/swapped operands of `%`