Solved

Html table in Perl

Posted on 2007-11-14
2
455 Views
Last Modified: 2012-06-27
I retrieve a resultset using Perl DBI. And print it in a HTML table. But whenever there are no value for particular column then there is no cell border. I want entire table whether the column has value or not.
0
Comment
Question by:saibsk
2 Comments
 
LVL 3

Expert Comment

by:BioI
ID: 20281078
check whether the value exists in your table,
and if the value is not defined, print " "
if (defined($columnvalue)) {
   print "<td>$columnvalue</td>";
}else{
   print "<td>&nbsp;</td>";
}
0
 
LVL 39

Accepted Solution

by:
Adam314 earned 500 total points
ID: 20281409
Change:
    print qq[<td style="">] .escapeHTML($cell). qq[</td>];
To:
    print qq[<td style="">] .(escapeHTML($cell) or "&nbsp;"). qq[</td>];
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now