'value_name could be a string, a tuple of strings, or \'*\''

def getOne(self, table_name, value_name, where=None, conj=u'AND', **kw):

    if isinstance(value_name, tuple):
        value_names = u','.join(value_name)
    elif isinstance(value_name, list):
        value_names = u','.join(value_name)
    else:
        value_names = value_name
    if isinstance(table_name, tuple):
        table_names = u','.join(table_name)
    elif isinstance(table_name, list):
        table_names = u','.join(table_name)
    else:
        table_names = table_name
    sql = (u'SELECT    %s    FROM    %s' % (value_names, table_names))
    if (where or kw):
        sql += u'    WHERE    '
    if where:
        sql += where
        if kw:
            sql += (u'    %s    ' % conj)
    if kw:
        arg = []
        for (k, v) in kw.iteritems():
            if isinstance(v, tuple):
                operator = v[0]
                arg.append(v[1])
            else:
                operator = '='
                arg.append(v)
            sql += (u'    %s    %s    ?    ' % (k, operator))
            sql += conj
        sql = sql[:(- len(conj))]
    else:
        arg = None
    return self.fetchone(sql, arg)
