Beispiel #1
0
def sigle_data_select(boat=None, route=None, company=None):
    if boat is not None:
        sql = f"SELECT * FROM main_boat where boat=\"{boat}\""
    if route is not None:
        sql = f"SELECT * FROM route_detail where route=\"{route}\""
    if company is not None:
        sql += f" and company=\"{company}\""
    print(sql)
    return sql_handle.sql_search(sql)
Beispiel #2
0
def main_data_select(need="description_zh",
                     company=None,
                     boat=None,
                     table="main_boat",
                     route=None):
    sql = f"SELECT * FROM {table} where {need}=\"\""
    if company is not None:
        sql += f" and company=\"{company}\""
    if boat is not None:
        sql += f" and boat=\"{boat}\""
    if route is not None:
        sql += f" and route=\"{route}\""
    print(sql)
    return sql_handle.sql_search(sql)
Beispiel #3
0
def sea_select(sql=f"SELECT * FROM main_route where company=\"{COMPANY}\""):
    return sql_handle.sql_search(sql)
Beispiel #4
0
def company_select():
    sql = f"SELECT * FROM company_list "
    return sql_handle.sql_search(sql)
Beispiel #5
0
def route_detail_select(need="description_zh", company=None):
    sql = f"SELECT * FROM route_detail where {need}=\"\""
    if company is not None:
        sql += f" and company=\"{company}\""
    return sql_handle.sql_search(sql)
Beispiel #6
0
def all_boat():
    sql = f"SELECT * FROM main_boat"
    return sql_handle.sql_search(sql)
Beispiel #7
0
def all_route():
    sql = f"SELECT * FROM route_detail"
    return sql_handle.sql_search(sql)
Beispiel #8
0
def route_detail_select(route=None):
    sql = f"SELECT * FROM route_detail where company=\"{COMPANY}\""
    if route is not None:
        sql += f" and route=\"{route}\" "

    return sql_handle.sql_search(sql)
Beispiel #9
0
def select_main_boats(boat=None):
    sql = f"SELECT * FROM main_boat where company=\"{COMPANY}\""
    if boat is not None:
        sql += f" and boat=\"{boat}\" "
    return sql_handle.sql_search(sql)