Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.113 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.78; '*S*': 0.00; 'cc:addr:python-list': 0.10; 'subject:compare': 0.16; 'cc:2**0': 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; 'lot.': 0.29; 'saves': 0.30; 'received:google.com': 0.34; 'thanks': 0.34; 'received:209.85': 0.35; 'but': 0.36; 'received:209': 0.37; 'subject:: ': 0.38; 'where': 0.40; 'header:Received:5': 0.40; 'think': 0.40; 'lower': 0.61; 'to:addr:gordon': 0.84 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 :cc:content-type; bh=HAfzUTMEpOkHNnY3lAhPvfOYtQIdJAJ6Ft4hGELXmm4=; b=Sb6kyAgY/VkfAQtei3krGAF5fACH5ZMY6Ebrx6GWKH0DK2XT5TRHLKQmu/nhf8PZSG duzitsWssWTFxI9JNANFibG+VmziiOQe6mCyHnVWIbzPASwN/5It84Qg8Ic3SaLlWoif bUnb/Pp5cojgJu4NMhpWTwX7oY2LmgzkTUR4y/bdxTGQZziE8yeprVZx1Tn9RQg9x/06 p5ZSKf+T2NOaM22KSGEtMEDYRioaPT3XNLsxTinuM07BZJuQzEOVosUXbh4ZpBRuP17Q TxZN93kdz1qZ0CpQnzv8+turJ5IeVhpmtpwvkg4wWe50YHWYD+C0/7sa7ZgF9oX6t3f+ ZgdA== MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 11 Dec 2012 23:39:42 +0100 Subject: Re: MySQLdb compare lower From: Anatoli Hristov To: John Gordon Content-Type: text/plain; charset=UTF-8 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 9 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1355265586 news.xs4all.nl 6944 [2001:888:2000:d::a6]:51447 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:34658 > I think this will work: > > sql = 'UPDATE product SET price=%s WHERE LOWER(sku)=%s' > cursor.execute(sql, (price, sku.lower()) > Thanks John, this works, I was about to make double check with lower and upper, but this saves me :) Thanks a lot.