You are going to have to set the paging options. You should be able to do something like this:
$rec->{url} = $CFG->{db_cgi_url} . "/featured.cgi";
$rec->{num_hits} = $sth->hits;
$rec->{current_page} = $IN->param('nh');
before you print the template. You will have to change $IN->param('page') to $IN->param('nh')
This selects all validated and featured links. However, how would I select all Featured links OR all those links with an ExpiryDate less than a certain date?
Dates are not easily messed with. Besides keys and speed, that is why there is a isNew column instead of if date is new etc... In order to select all featured links OR something else you need an actual conditional statement.
eg. - if no featured links, then select something else
As far as selected expirydate less than a certain date, I suppose you could do:
$sth = $tab->select( { ExpiryDate => "< whatever format the date is"} );
I don't know if that would work since ExpiryDate is not a date field anyway (it wills say no payment required).
You just have to mess with it to get whatever outcome you are looking for.
Hope this helps,
- Jonathan
$rec->{url} = $CFG->{db_cgi_url} . "/featured.cgi";
$rec->{num_hits} = $sth->hits;
$rec->{current_page} = $IN->param('nh');
before you print the template. You will have to change $IN->param('page') to $IN->param('nh')
Quote:
This selects all validated and featured links. However, how would I select all Featured links OR all those links with an ExpiryDate less than a certain date?
Dates are not easily messed with. Besides keys and speed, that is why there is a isNew column instead of if date is new etc... In order to select all featured links OR something else you need an actual conditional statement.
eg. - if no featured links, then select something else
As far as selected expirydate less than a certain date, I suppose you could do:
$sth = $tab->select( { ExpiryDate => "< whatever format the date is"} );
I don't know if that would work since ExpiryDate is not a date field anyway (it wills say no payment required).
You just have to mess with it to get whatever outcome you are looking for.
Hope this helps,
- Jonathan