A certainl part of an if() structure never gets executed.
Grant Edwards
invalid at invalid.invalid
Wed Jun 12 10:38:29 EDT 2013
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.]
Anyway, I salute your patience.
--
Grant Edwards grant.b.edwards Yow! ... I'm IMAGINING a
at sensuous GIRAFFE, CAVORTING
gmail.com in the BACK ROOM of a
KOSHER DELI --
More information about the Python-list
mailing list