Gossamer Forum
Home : Products : DBMan : Customization :

Unique Rows in Output Tables

Quote Reply
Unique Rows in Output Tables
[Please excuse my question in advance...I am new to programming Perl for NT. I am used to programming Perl for UNIX. They are two totally different processes...and beasts!]

Hi there.

I am applying the DBMan to a web based Employee Directory at my job. The DBMan program has worked out really nice. However, I am wondering how I can allow certain rows to appear in output tables based on information inputed in the "Add" and "Modify" screens.

The reason that I want to do is that we want to add two rows based on faculty information (Courses and Course Titles) that do not apply to Staff.

I attempted to use the following codes in
the "display html" sub-routine:

(NOTE: ... stands for continued coding.)

print qq|

<TABLE BORDER=0>...

|;

if $rec{Courses} {
print "<TR><TD><$font><b>Courses:</b></TD></TR>
<TD>$rec{Courses}</TD>";
}

if $rec{Subjects} {
print "<TR><TD><$font><b>Subjects:</b></TD></TR>
<TD>$rec{Subjects}</TD>";
}

print qq|
<TR><TD>...

|;

I also tried this variation of the codes:

print qq|

<TABLE BORDER=0>...

|;

if ($rec{Courses}) {
print "<TR><TD><$font><b>Courses:</b></TD></TR>
<TD>$rec{Courses}</TD>";
}

if ($rec{Subjects}) {
print "<TR><TD><$font><b>Subjects:</b></TD></TR>
<TD>$rec{Subjects}</TD>";
}

print qq|
<TR><TD>...

|;

Anyone have suggestions on how I can allow unique rows/data to show for particular records and not for other records?

Thanks in advance.





------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited April 08, 1999).]

[This message has been edited by Eliot (edited April 08, 1999).]
Quote Reply
Re: Unique Rows in Output Tables In reply to
You "if" structures look fine and should work. I don't see any difference between the two variations you posted, though.

One thing that may be causing problems is that you have left out a closing </TR> and </font> tags --

if $rec{Courses} {
print "<TR><TD><$font><b>Courses:</b></font></TD>
<TD>$rec{Courses}</TD></TR>";
}
-------------
JPD

[This message has been edited by JPDeni (edited April 09, 1999).]
Quote Reply
Re: Unique Rows in Output Tables In reply to
Thanks for the advice. I realized that the problem with the codes was I forgot to put the \ operator between the "".

The correct codes look are

if $rec{Courses} {
print"<TR><TD><$font><b>Courses:</b></TD></TR><TD>$rec{Courses}</TD>";
}

if $rec{Subjects} {
print"<TR><TD><$font><b>Subjects:</b></TD></TR><TD>$rec{Subjects}</TD>";
}


------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us