import pymysql


def getConn():
    return pymysql.connect('localhost', 'root', '123456', 'tencentcourse')


def getQueryList(sql):
    conn = getConn()
    cursor = conn.cursor()
    cursor.execute(sql)
    info = cursor.fetchall()
    return info


def getCategory():
    sql = "select * from categories"
    category = getQueryList(sql)
    for item in category:
        yield item[0], item[2]







cf54fcf4a85c7f40d71fe81ba797d4dea80c6772
<mask token>


def getConn():
    return pymysql.connect('localhost', 'root', '123456', 'tencentcourse')


<mask token>

<mask token>


def getConn():
    return pymysql.connect('localhost', 'root', '123456', 'tencentcourse')


def getQueryList(sql):
    conn = getConn()
    cursor = conn.cursor()
    cursor.execute(sql)
    info = cursor.fetchall()
    return info


<mask token>

<mask token>


def getConn():
    return pymysql.connect('localhost', 'root', '123456', 'tencentcourse')


def getQueryList(sql):
    conn = getConn()
    cursor = conn.cursor()
    cursor.execute(sql)
    info = cursor.fetchall()
    return info


def getCategory():
    sql = 'select * from categories'
    category = getQueryList(sql)
    for item in category:
        yield item[0], item[2]

import pymysql


def getConn():
    return pymysql.connect('localhost', 'root', '123456', 'tencentcourse')


def getQueryList(sql):
    conn = getConn()
    cursor = conn.cursor()
    cursor.execute(sql)
    info = cursor.fetchall()
    return info


def getCategory():
    sql = 'select * from categories'
    category = getQueryList(sql)
    for item in category:
        yield item[0], item[2]

import pymysql


def getConn():
    return pymysql.connect('localhost', 'root', '123456', 'tencentcourse')


def getQueryList(sql):
    conn = getConn()
    cursor = conn.cursor()
    cursor.execute(sql)
    info = cursor.fetchall()
    return info


def getCategory():
    sql = "select * from categories"
    category = getQueryList(sql)
    for item in category:
        yield item[0], item[2]






