(tablename,props,prere)
return False
更新记录
更新记录
更新记录
def UpdateWithDict(tablename,props,prere):
    """更新记录
    """
    sql = forEachUpdateProps(tablename, props, prere)
    conn = dbpool.connection(write=True,tablename=tablename)
    cursor = conn.cursor()
    count = 0
    try:
        count = cursor.execute(sql)
        conn.commit()
    except Exception,e:
        log.err(e,traceback.format_exc())
        log.err(sql)
    cursor.close()
    conn.close()
    if(count >= 1):
        return True
    return False
def UpdateWithDict ( tablename , props , prere ) : sql = forEachUpdateProps ( tablename , props , prere ) conn = dbpool . connection ( write = True , tablename = tablename ) cursor = conn . cursor ( ) count = 0 try : count = cursor . execute ( sql ) conn . commit ( ) except Exception , e : log . err ( e , traceback . format_exc ( ) ) log . err ( sql ) cursor . close ( ) conn . close ( ) if ( count >= 1 ) : return True return False