Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [donm] Query help?

Quote Reply
Re: [donm] Query help? In reply to
ops I mean the Template Globals in Admin panel >> Templates where you can set a global tag (i.e. something => a value) or a simple function (return a value) then you can simply get a new tag <%something%> to display that value in your templates.
Quote:
What I have in the "date_exp" field is the date of expiration in the form of "2001-11-26".
So you can replace the code above with :
my $date_exp_num = GT::Date::date_diff($tag->{date_exp},$today) ; # which returns number of days difference between date_exp and today.
and customize things like :
if ($date_exp_num < 0) {
....expired....
}
elsif ($date_exp_num < 30) {
...will expire within the next $date_exp_num days
}

Cheers,
jean@gossamer-threads.com


Last edited by:

jean: Nov 26, 2001, 5:56 PM
Subject Author Views Date
Thread Query help? donm 5203 Nov 26, 2001, 2:47 PM
Thread Re: [donm] Query help?
jean 5067 Nov 26, 2001, 4:36 PM
Thread Re: [jean] Query help?
donm 5073 Nov 26, 2001, 5:01 PM
Thread Re: [donm] Query help?
jean 5075 Nov 26, 2001, 5:54 PM
Thread Re: [jean] Query help?
donm 5042 Nov 26, 2001, 6:02 PM
Post Re: [donm] Query help?
donm 5055 Nov 28, 2001, 11:07 AM
Thread Re: [jean] Query help?
Reena0330 4807 Sep 10, 2002, 1:33 PM
Thread Re: [Reena0330] Query help?
jean 4799 Sep 10, 2002, 1:59 PM
Post Re: [jean] Query help?
Reena0330 4812 Sep 12, 2002, 11:10 AM
Post Re: [jean] Query help?
Reena0330 4854 Aug 15, 2002, 1:53 PM