Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #74233
| X-Received | by 10.66.155.226 with SMTP id vz2mr3296388pab.47.1404890096982; Wed, 09 Jul 2014 00:14:56 -0700 (PDT) |
|---|---|
| X-Received | by 10.50.61.145 with SMTP id p17mr216524igr.16.1404890096831; Wed, 09 Jul 2014 00:14:56 -0700 (PDT) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!enother.net!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!r10no108908igi.0!news-out.google.com!gf2ni1igb.0!nntp.google.com!hn18no687241igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.python |
| Date | Wed, 9 Jul 2014 00:14:56 -0700 (PDT) |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=125.227.248.66; posting-account=pJ7uNAoAAAAHwdz2gtW7xXFmZBh0Iyco |
| NNTP-Posting-Host | 125.227.248.66 |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <a02846bc-5d64-47bb-8563-d3cbc5b82e33@googlegroups.com> (permalink) |
| Subject | same code same tables but not the same result(use flask and postgres) |
| From | Frank Liou <fk26541598fk@gmail.com> |
| Injection-Date | Wed, 09 Jul 2014 07:14:56 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-Received-Bytes | 1533 |
| X-Received-Body-CRC | 2707210276 |
| Xref | csiph.com comp.lang.python:74233 |
Show key headers only | View raw
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
but
one i got
MTIzNDU2Nzg= <==it's right
anoter i got
\x4d54497a4e4455324e7a673d
i change database to another database
but tables is use same code to create
what 's wrong??
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
same code same tables but not the same result(use flask and postgres) Frank Liou <fk26541598fk@gmail.com> - 2014-07-09 00:14 -0700
Re: same code same tables but not the same result(use flask and postgres) Chris Angelico <rosuav@gmail.com> - 2014-07-09 17:22 +1000
Re: same code same tables but not the same result(use flask and postgres) Frank Liou <fk26541598fk@gmail.com> - 2014-07-09 00:25 -0700
Re: same code same tables but not the same result(use flask and postgres) Frank Liou <fk26541598fk@gmail.com> - 2014-07-09 00:46 -0700
csiph-web