Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Neil Cerutti Newsgroups: comp.lang.python Subject: Re: A certainl part of an if() structure never gets executed. Date: 12 Jun 2013 14:55:34 GMT Organization: Norwich University Lines: 25 Message-ID: References: <2bc90d3b-09c2-4315-9357-ff7f039465e0@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: individual.net U94CJmaJznrhcdZPKV2QXAOp1SwjjWpYawXq+LQRWsb46fjIan Cancel-Lock: sha1:f5vv3f8yVE3NjED5+5fNZZ/qE3s= User-Agent: slrn/0.9.9p1/mm/ao (Win32) Xref: csiph.com comp.lang.python:47810 On 2013-06-12, Grant Edwards wrote: > On 2013-06-12, Tim Roberts wrote: >> ???????? ?????? wrote: >>> >>>[code] >>> if not re.search( '=', name ) and not re.search( '=', month ) and not re.search( '=', year ): >>> cur.execute( '''SELECT * FROM works WHERE clientsID = (SELECT id FROM clients WHERE name = %s) and MONTH(lastvisit) = %s and YEAR(lastvisit) = %s ORDER BY lastvisit ASC''', (name, month, year) ) >>> elif not re.search( '=', month ) and not re.search( '=', year ): >>> cur.execute( '''SELECT * FROM works WHERE MONTH(lastvisit) = %s and YEAR(lastvisit) = %s ORDER BY lastvisit ASC''', (month, year) ) >>> elif not re.search( '=', year ): >>> cur.execute( '''SELECT * FROM works WHERE YEAR(lastvisit) = %s ORDER BY lastvisit ASC''', year ) >> >> There is so much you didn't tell us here, including which database you are >> using. > > Are you guys _still_ on Nikos hook? > > [No, I don't really think he's trolling, but it would be really > impressive if he were.] He's definitely trolling. I can't think of any other reason to make it so hard to kill-file himself. -- Neil Cerutti