A certainl part of an if() structure never gets executed.
Neil Cerutti
neilc at norwich.edu
Wed Jun 12 10:55:34 EDT 2013
On 2013-06-12, Grant Edwards <invalid at invalid.invalid> wrote:
> On 2013-06-12, Tim Roberts <timr at probo.com> wrote:
>> ???????? ?????? <nikos.gr33k at gmail.com> 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
More information about the Python-list
mailing list