Пример #1
0
def test():

    val1 = languageScr.getLocText(0,'HELP')
    val2 = languageScr.getLocText(1,'HELP')
    query1 = """
               INSERT INTO countrylist (id,eng,mal)VALUES (%d,'%s','%s')
             """%(1,val1,val2)

    conn = MySQLdb.connect (host = "localhost", db = "test")
    cursor = conn.cursor()

    cursor.execute (query1)
    cursor.close ()
    conn.commit()
    conn.close()
Пример #2
0
def getText(key):
    l = SESSINFO.getLangId()
    return languageScr.getLocText(l,key)