... where the second is:
my $brand_id = shift;
my $query = q|SELECT
Contact_Email
FROM glinks_Links
WHERE
BrandID = | . $brand_id . q| LIMIT 0,1|;
return $DB->table('Links')->do_query($query)->fetchrow_hashref || undef;
}forgot to remove the placeholder and fetchrow_hashref
Code:
sub { my $brand_id = shift;
my $query = q|SELECT
Contact_Email
FROM glinks_Links
WHERE
BrandID = | . $brand_id . q| LIMIT 0,1|;
return $DB->table('Links')->do_query($query)->fetchrow_hashref || undef;
}