Hi
I'm using the following global to pull the images from certain links.
It works OK but if there are not any images in say Image_3 or Image_4 it shows as a broken image.
What do I need to add or change to make sure it checks if there is an image to load up first.
I have the following in the links table.
Image_1, Image_2, Image_3, Image_4 and they are either gif or jpg.
In select > { Image_1 => 'gif'} ??
sub {
# Displays images.
my ($output,$sth,$link);
my $search_db = $DB->table('Links');
$search_db->select_options ('ORDER BY ADD_DATE DESC','Limit 100');
$sth = $search_db->select ( { LinkType => 'Images'});
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link_images', $link);
}
return $output;
}
Thanks
Regards
minesite
I'm using the following global to pull the images from certain links.
It works OK but if there are not any images in say Image_3 or Image_4 it shows as a broken image.
What do I need to add or change to make sure it checks if there is an image to load up first.
I have the following in the links table.
Image_1, Image_2, Image_3, Image_4 and they are either gif or jpg.
In select > { Image_1 => 'gif'} ??
sub {
# Displays images.
my ($output,$sth,$link);
my $search_db = $DB->table('Links');
$search_db->select_options ('ORDER BY ADD_DATE DESC','Limit 100');
$sth = $search_db->select ( { LinkType => 'Images'});
while ($link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('link_images', $link);
}
return $output;
}
Thanks
Regards
minesite