same code same tables but not the same result(use flask and postgres)

Frank Liou fk26541598fk at
Wed Jul 9 09:14:56 CEST 2014

i use flask connect to postgres

def post_insert(username):
    conn = engine.connect()
    encoded = base64.b64encode(username.encode('utf-8'))
    puresql = sqla.text("INSERT INTO friends(name) VALUES(:encoded)")
    conn.execute(puresql,encoded = encoded)

i insert username encode with base64 to my database


one i got 

MTIzNDU2Nzg=   <==it's right

anoter i got


i change database to another database

but tables is use same code to create

what 's wrong??

More information about the Python-list mailing list