Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Html table in Perl

Posted on 2007-11-14
2
Medium Priority
?
464 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses four methods for overlaying images in a container on a web page
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
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)

610 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