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


Groups > comp.lang.python > #35073

Why Doesn't This MySQL Statement Execute?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <borkintom@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.023
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'warnings': 0.03; 'tom': 0.07; 'subject:Why': 0.09; 'tia,': 0.09; '%s,': 0.16; 'hi;': 0.16; 'command': 0.24; 'errors.': 0.27; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'interactions': 0.29; 'prints': 0.29; 'skip:& 10': 0.29; 'print': 0.32; 'to:addr:python-list': 0.33; 'code:': 0.33; 'received:google.com': 0.34; 'subject:?': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'test': 0.36; 'execute': 0.37; 'does': 0.37; 'received:209': 0.37; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'subject:This': 0.78; '\xa0\xa0\xa0\xa0\xa0': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=tQdCLn+WyzwACEXwl5gX6+UfTKOuDtri4qHTxmuXbew=; b=K9k4tgZ8OICviBDxh/PfjLrPUxS7T/iSWOTcQ8o1ErkR/zyBeJH6rO5qjaDgin/ke1 wAGLtJ3iM4OK4ooLeQT/qlLh7+8XwsSonCE+onUMGzjaAKQbnQ5j9MjeCdHqI1oYHint F/INWl0aMcrAXlDaOylgFMuFnZFZfNW5H3UXT+5Qu1WnauLzaOtko7ZzHxFN79zVFmAs BVsPSoGz7pz3fzC+BKGj6gPpvOb6YQDvbtTiyYF8/ye2PL5pi6IdTGVOY20G0siBQwGq JDDjykC4FwCEj1Q4J+Di748jkbEeKShgxExe0fV9ybf5YWLGaIB+NkHCacc+eyDUuz4f BsIQ==
MIME-Version 1.0
Date Tue, 18 Dec 2012 17:34:08 -0400
Subject Why Doesn't This MySQL Statement Execute?
From Tom Borkin <borkintom@gmail.com>
To python-list@python.org
Content-Type multipart/alternative; boundary=bcaec517a5720803d204d12742d3
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.1029.1355866451.29569.python-list@python.org> (permalink)
Lines 33
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1355866451 news.xs4all.nl 6983 [2001:888:2000:d::a6]:53552
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:35073

Show key headers only | View raw


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

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?
TIA,
Tom

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


Thread

Why Doesn't This MySQL Statement Execute? Tom Borkin <borkintom@gmail.com> - 2012-12-18 17:34 -0400
  Re: Why Doesn't This MySQL Statement Execute? Hans Mulder <hansmu@xs4all.nl> - 2012-12-18 23:57 +0100
    Re: Why Doesn't This MySQL Statement Execute? Tom Borkin <borkintom@gmail.com> - 2012-12-18 20:11 -0400
      Re: Why Doesn't This MySQL Statement Execute? John Gordon <gordon@panix.com> - 2012-12-19 03:57 +0000
        Re: Why Doesn't This MySQL Statement Execute? Chris Angelico <rosuav@gmail.com> - 2012-12-19 15:49 +1100
        Re: Why Doesn't This MySQL Statement Execute? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-12-19 00:40 -0500
  Re: Why Doesn't This MySQL Statement Execute? Alister <alister.ware@ntlworld.com> - 2012-12-19 13:28 +0000

csiph-web