Solved

Html table in Perl

Posted on 2007-11-14
2
457 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

776 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