[Zope-dev] How to query time in sqlmethod?
Victor.Zhai@ogilvy.com
Victor.Zhai@ogilvy.com
Thu, 17 Feb 2000 14:49:16 +0800
Hi,all
What I want to do is restrict the select condiction In my sql syntax:
These is one field in My database named: "publish_time" which format is: "2000-02-17"
And in my query template, I want to query the result which fits the " One week(0) , One month(1), All(2)"
select ...
from ProductDb
where
ProductDb.sort = <dtml-sqlvar sort type=int>
and ProductDb.gqlb = <dtml-sqlvar gqlb type=int>
and ProductDb.publish_time - ZopeTime() < cal : I want to do
[ Cal can be 7(One week),30(One month),360(All)..]
How to do that?
Thanks a lot!
Victor zhai.
"WorldSecure Server <ogilvy.com>" made the following
annotations on 02/17/00 08:59:01
------------------------------------------------------------------------------
Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer does not consent to email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of the Ogilvy Group shall be understood as neither given nor endorsed by it.
==============================================================================