Dear Jason, Eugene,
The Date files are displayed based on our
selection in the html file, the data is fetched as a
row and is saved in an array and not in a single
variable, here is the part of the code which deals
with the display
sub get_data {
my $i = 0;
my $db_val = "";
# SET UP and EXECUTE the proper query.
#
------------------------------------------------------------
my $q = "SELECT ";
foreach $field(@fields) { $q .= $field . ", ";}
my $query = substr($q, 0, length($q) - 2);
foreach $scan(@entries) {
if (substr($scan, length($scan)-1, 1) =~ /\W/)
{$scan = substr($scan, 0, length($scan)-1);}
$db_val .= "\'" . $scan . "\',";
}
$db_val = substr($db_val, 0, length($db_val)-1);
$fromstring = " from ";
if (@c_fields > 0) {
$fromstring .= "Cell_Line c, ";
}
if (@s_fields > 0) {
$fromstring .= "Study_Login s, ";
}
if (@d_fields > 0) {
$fromstring .= "DNA d, ";
}
if ((@c_fields > 0) && (@s_fields > 0)) {$matchstring
.= " and s.Cell_Line_Nbr = c.Cell_Line_Nbr";}
if ((@c_fields > 0) && (@d_fields > 0)) {$matchstring
.= " and d.Cell_Line_Nbr = c.Cell_Line_Nbr";}
$myFrom = substr($fromstring, 0,
length($fromstring)-2);
$query .= $myFrom . " where c.Cell_Line_Nbr in (" .
$db_val . ")" . $matchstring . " ORDER BY
c.Cell_Line_Nbr;";
# print "Content-type: text/html\n\n";
# print $query;
# exit;
my $sth = $dbh->prepare($query);
$sth->execute();
# PARSE return values and set up arrays to be
validated against
#
-------------------------------------------------------------
$j = 0;
while ((@RVAL)=$sth->fetchrow_array) {
$this_trow = $dataHTML;
$this_row = "";
for ($i=0; $i<@RVAL; $i++) {
$this_cell = $dataLoopHTML;
$this_cell =~ s/ZZ_VAL_ZZ/$RVAL[$i]/sig;
$this_cell =~ s/ZZ_WHICH_ROW_ZZ/$i/sig;
$this_cell =~ s/ZZ_THIS-ROW-VALUE_ZZ/$j/sig;
$this_cell =~ s/ZZ_LINE_VALUE_ZZ/$RVAL[$i]/sig;
$this_row .= $this_cell;
}
$this_trow =~ s/<!-- ZZ_DATA-LOOP_ZZ -->(.*?)<!--
ZZ_DATA-LOOP-END_ZZ -->/$this_row/sig;
$final_rows .= $this_trow;
$j++;
}
$sth->finish;
$total_fields = @fields;
$total_rows = $j;
}
I have tried using the piece of code u had sent me ,
but it dosent work , i would really appreciate it if
you could help me modify this part of the code
regards
harsha
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs