perlquestion
johnirl
Hi Monks,
in my current program I have a routine that retrieves results from my database. Currently I display the results from each statment in the following form.<p>
<code>
Result 1;
R1something1 ; R1something2 ;
R1something5 ; R1something6 ;
R1something7 ; R1something8 ;
Result2;
R2something1 ; R2something2 ;
R2something3 ; R2something4 ;
R2something5 ; R2something6 ;
R2something7 ; R2something8 ;
R2something9 ; R2something 10;
</code><p>
But I want to display them beside each other to aid with comparisons. Like so:<p>
<code>
Result 1 Result2
R1something1 ; R1something2 ; R2something1 ; R2something2 ;
-- ; -- ; R2something3 ; R2something4 ;
R1something5 ; R1something6 ; R2something5 ; R2something6 ;
R1something7 ; R1something8 ; R2something7 ; R2something8 ;
-- ; -- ; R2something9 ; R2something10;
</code>
<p>
I also need to know how I would substitute a null value with a "--" in my output file as I want the results that satisfy the same conditions beside each other and the results with no corresponding results in the other table should still be displayed i.e. R2Something 9 & 10 above.<br>
I am retrieving results row by row. But I am unsure of how to switch between the statements. Will I have to retrieve all results for one sql statement and then begin the second? Or can I switch between the two? Or is there some funky perl module that can take care of this for me?<br>
Any help you can give is appreciated<br>
Thanks Monks
<p>
<i> JohnIrl </i><p>
<i> Sum day soon I'Il lern how 2 spelI (r tYpe) </i>