예제 #1
0
def get_factory_by_code(code):
    # Prepare SQL query to get user location.
    sql = ("SELECT id FROM factory WHERE code = '%s'")
    results = du.execute(sql % code)
    return results
예제 #2
0
def get_vendor_by_code(code):
    sql = ("SELECT id FROM vendor WHERE code = '%s'")
    results = du.execute(sql % code)
    return results