Exemplo n.º 1
0
def search_school1():
    cursor = db.cursor()
    select = "SELECT name FROM university"  #获取表中xxxxx记录数
    cursor.execute(select)  #执行sql语句
    line = cursor.fetchone()
    while line != None:
        school1.append(line[0])
        line = cursor.fetchone()
    return school1
Exemplo n.º 2
0
def search_school_xuke():
    cursor = db.cursor()
    select = 'select university_id , xueke_code from xueshuo_mid '
    cursor.execute(select)  # 执行sql语句
    line = cursor.fetchone()
    while line != None:
        school_xuke.setdefault(line[0], []).append(line[1])
        line = cursor.fetchone()
    return school_xuke
Exemplo n.º 3
0
def search_chanye():
    cursor = db.cursor()
    select = "SELECT id,name FROM industry"  # 获取表中xxxxx记录数
    cursor.execute(select)  # 执行sql语句
    line = cursor.fetchone()
    while line != None:
        chanye.append((line[0], line[1]))
        line = cursor.fetchone()
    return chanye
Exemplo n.º 4
0
def search_xueke():
    cursor = db.cursor()
    select = "SELECT code,name FROM xueshuo"  # 获取表中xxxxx记录数
    cursor.execute(select)  # 执行sql语句
    line = cursor.fetchone()
    while line != None:
        xueshuo.append((line[0], line[1]))
        line = cursor.fetchone()
    return xueshuo
Exemplo n.º 5
0
def search_chanye_zhuan():
    cursor = db.cursor()
    select = 'SELECT industry_id,zhuanye_code from bk_cy'
    cursor.execute(select)  # 执行sql语句
    line = cursor.fetchone()
    while line != None:
        chanye_zhuanye.setdefault(line[0], []).append(line[1])
        line = cursor.fetchone()
    return chanye_zhuanye