Hi everybody,
I need some help with a global.
What I want to do is to display random logos of links (logo-upload) of the current category.
So it has to be checked:
a) if the link is validated
b) if the link's filed "Premium" is set to "2"
c) if there is a logo (was a logo uploaded by the link-owner: field "Logo_add" not empty
d) if the link is in the current category
So I need a valid global-code that does more or less the following:
sub {
# Display random premium-link logos by category
my ($id, CatId) = shift;
my $sth = SELECT RAND($ID) FROM Links, Category WHERE Links.Premium="2" AND Links.isValidated="Yes" AND Links.Logo_add AND Category.ID='$CatId' ORDER BY RAND() LIMIT 1,10
while ($sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('logo_links', $id);
}
return $output;
}
It would be very nice, if someone here could help me creating the proper global.
Regards,
Manu
Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
I need some help with a global.
What I want to do is to display random logos of links (logo-upload) of the current category.
So it has to be checked:
a) if the link is validated
b) if the link's filed "Premium" is set to "2"
c) if there is a logo (was a logo uploaded by the link-owner: field "Logo_add" not empty
d) if the link is in the current category
So I need a valid global-code that does more or less the following:
Code:
sub {
# Display random premium-link logos by category
my ($id, CatId) = shift;
my $sth = SELECT RAND($ID) FROM Links, Category WHERE Links.Premium="2" AND Links.isValidated="Yes" AND Links.Logo_add AND Category.ID='$CatId' ORDER BY RAND() LIMIT 1,10
while ($sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('logo_links', $id);
}
return $output;
}
It would be very nice, if someone here could help me creating the proper global.
Regards,
Manu
Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.