コード例 #1
0
def getCityXiaoqu(sql=''):
    ms = GJDB()
    ms.ms()
    ms.selectDB('xiaoqu')
    ms.executeDB('SET NAMES UTF8;')
    if sql == '':
        sql = 'SELECT distinct city, name FROM xiaoqu_xiaoqu;'
    return ms.selectData(sql)
コード例 #2
0
ファイル: SEMURL.py プロジェクト: hfutsuchao/Python2.6
def getCityXiaoqu(sql=''):
    ms = GJDB()
    ms.ms()
    ms.selectDB('xiaoqu')
    ms.executeDB('SET NAMES UTF8;')
    if sql == '':
        sql = 'SELECT distinct city, name FROM xiaoqu_xiaoqu;'
    return ms.selectData(sql)
コード例 #3
0
def getCityDistrictStreet(sql=''):
    management = GJDB()
    management.management()
    management.selectDB('management')
    management.executeDB('SET NAMES UTF8;')
    if sql == '':
        sql = 'SELECT city.short_name city_name, city.domain, district.short_name district_name,district.url, street.street_name, street.url FROM street INNER JOIN district INNER JOIN city ON district.district_id=street.district_id AND city.city_id=district.city_id;'
    return management.selectData(sql)
コード例 #4
0
ファイル: SEMURL.py プロジェクト: hfutsuchao/Python2.6
def getCityDistrictStreet(sql=''):
    management = GJDB()
    management.management()
    management.selectDB('management')
    management.executeDB('SET NAMES UTF8;')
    if sql == '':
        sql = 'SELECT city.short_name city_name, city.domain, district.short_name district_name,district.url, street.street_name, street.url FROM street INNER JOIN district INNER JOIN city ON district.district_id=street.district_id AND city.city_id=district.city_id;'
    return management.selectData(sql)