Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #35075

Re: Why Doesn't This MySQL Statement Execute?

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <wayne@waynewerner.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.010
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'warnings': 0.03; 'tom': 0.07; 'subject:Why': 0.09; 'cc:addr:python-list': 0.10; 'dec': 0.15; '%s,': 0.16; 'chance?': 0.16; 'hi;': 0.16; 'wrote:': 0.17; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'command': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header :User-Agent:1': 0.26; 'errors.': 0.27; "doesn't": 0.28; 'interactions': 0.29; 'prints': 0.29; 'print': 0.32; 'code:': 0.33; 'table': 0.35; 'subject:?': 0.35; 'but': 0.36; 'test': 0.36; 'execute': 0.37; 'does': 0.37; 'drop': 0.37; 'subject:: ': 0.38; 'subject:This': 0.78; 'from:addr:wayne': 0.84; '\xa0\xa0\xa0\xa0\xa0': 0.84
Date Tue, 18 Dec 2012 16:02:01 -0600 (CST)
From Wayne Werner <wayne@waynewerner.com>
X-X-Sender wayne@gilgamesh
To Tom Borkin <borkintom@gmail.com>
Subject Re: Why Doesn't This MySQL Statement Execute?
In-Reply-To <CAAPnF_VFzdcXW8Eg20kn_j0ywvG7CbK+jY3u_0EZjJhR-m4Meg@mail.gmail.com>
References <CAAPnF_VFzdcXW8Eg20kn_j0ywvG7CbK+jY3u_0EZjJhR-m4Meg@mail.gmail.com>
User-Agent Alpine 2.02 (DEB 1266 2009-07-14)
MIME-Version 1.0
Content-Type MULTIPART/MIXED; BOUNDARY="8323329-1427192580-1355868121=:20469"
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1031.1355868222.29569.python-list@python.org> (permalink)
Lines 26
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1355868222 news.xs4all.nl 6959 [2001:888:2000:d::a6]:34663
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:35075

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On Tue, 18 Dec 2012, Tom Borkin wrote:

> Hi;
> I have this test code:
>  
>     if i_id == "1186":
>       sql = 'insert into interactions values(Null, %s, "Call Back", "%s")' % (i_id, date_plus_2)
>       cursor.execute(sql)
>       db.commit()
>       print sql
> It prints the sql statement, but it doesn't execute. If I copy and paste the sql into the mysql command line it does execute without warnings or errors. What gives?

Does date_plus_2 contain

      "Robert"); DROP TABLE interactions; --

By any chance?
-W

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Why Doesn't This MySQL Statement Execute? Wayne Werner <wayne@waynewerner.com> - 2012-12-18 16:02 -0600

csiph-web