Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #35088
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.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 | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'exception': 0.03; 'column': 0.07; 'tom': 0.07; 'python': 0.09; '(although': 0.09; 'executes': 0.09; 'received:mail-vc0-f174.google.com': 0.09; 'subject:Why': 0.09; 'dec': 0.15; '%s,': 0.16; 'bindings,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'pulls': 0.16; 'specific,': 0.16; 'settings': 0.16; 'wed,': 0.16; 'wrote:': 0.17; 'specifies': 0.17; 'either.': 0.22; 'work,': 0.22; 'errors': 0.23; 'originally': 0.23; "i've": 0.23; 'tried': 0.25; 'header:In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'noticed': 0.28; '"no': 0.29; 'aims': 0.29; 'interactions': 0.29; 'received:209.85.220.174': 0.29; 'statements': 0.29; 'writes:': 0.29; "i'm": 0.29; 'worked': 0.30; "aren't": 0.33; 'like:': 0.33; 'oracle': 0.33; 'problem': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'pm,': 0.35; 'received:209.85.220': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'really': 0.36; 'but': 0.36; 'depends': 0.36; "didn't": 0.36; 'does': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'john': 0.60; 'subject:This': 0.78; 'actually,': 0.84; 'was:': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=HkC7LmYFJaBk3oC06GSWiVcsSa/su+wwbpJFHyXIjwk=; b=HAIZbKJOOA0/xBgePuYkcyUqy1pEcmby30b5O6HeFecuCS8lXuXbJptxqR30FvZ+8L Elk6G+5TXRyK04/sNiQyAL/qHO9qCXnE9BIF86qoaYzHKTI92Nf56faM5fuQ4ELG/hpF k8UJEUdVeZkvq612/oaT59qp/72MqEqBP+p1oz0DA7IlbKPNhrmMm6vl3SJLaVUhZKzm pkWNF8bnOIx1tpwJW+WDiXT4geV3OdkOtezU3r0C4pCDthrdSML9dfg+6iLvf9fJ3zEh tq/Eq/2Up07whko1KgGKWcGKVo1SIPJKUe1ZdrvEzEZqQlM5GOD30LHiSnEnwqpBoS5S PhiQ== |
| MIME-Version | 1.0 |
| In-Reply-To | <kardvl$6u7$1@reader1.panix.com> |
| References | <mailman.1029.1355866451.29569.python-list@python.org> <50d0f4c7$0$6952$e4fe514c@news2.news.xs4all.nl> <mailman.1037.1355875874.29569.python-list@python.org> <kardvl$6u7$1@reader1.panix.com> |
| Date | Wed, 19 Dec 2012 15:49:41 +1100 |
| Subject | Re: Why Doesn't This MySQL Statement Execute? |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| 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.1038.1355893067.29569.python-list@python.org> (permalink) |
| Lines | 29 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1355893067 news.xs4all.nl 6943 [2001:888:2000:d::a6]:51249 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:35088 |
Show key headers only | View raw
On Wed, Dec 19, 2012 at 2:57 PM, John Gordon <gordon@panix.com> wrote:
> In <mailman.1037.1355875874.29569.python-list@python.org> Tom Borkin <borkintom@gmail.com> writes:
>
>> Actually, what I originally had was:
>> cursor.execute("""insert into interactions values(Null, %s, "Call Back",
>> %s)""", (i_id, date_plus_2))
>> and that didn't work, either. I tried your variation like:
>> cursor.execute("""insert into interactions values(Null, %s, "Call Back",
>> %s)""" % (i_id, date_plus_2))
>> and no cigar :(
>> Tom
>
> Have you tried using single-quotes around Call Back, instead of
> double quotes? I've noticed that SQL statements prefer single-quoted
> strings (although that may be Oracle specific, as that's all I've really
> worked with).
The SQL standard specifies single quotes, but MySQL and the SQL
standard aren't always on speaking terms. It depends on the MySQL
settings as to whether "asdf" means 'asdf' or means a column named
asdf.
But if that's what the problem is, there ought to be an exception
coming back, surely? I'm not familiar with the Python MySQL bindings,
but that's what I would expect. What, specifically, does "no cigar"
mean? It executes without errors but does nothing? It purchases a gun,
aims at your shoe, and pulls the trigger?
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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