displaying a mysql table vertically - for comparison or for print out purposes

Abhijeet

New Member
Say you got a table view like this\[code\]seed_id name country------- ---------- -------1 John America2 Jose Mexico3 Khan Pakistan\[/code\]and you'd like to paint the HMTL vertically as follows;\[code\]seed_id 1 2 3name John Jose Khancountry America Mexico Pakistan\[/code\]This kind of view comes very handy in two cases.You want to print the table view or you want to compare fields side by side.In print view, on a table with 50 fields, even printing a single record view does not get you a viewable print out. The paper will cut out the print proably at the 10th field or so.but with a vertical view, it does not matter how many fields the table have. Similarly, when you compare records side by side, like in this beautiful examplehttp://www.dpreview.com/products/co...=nikon_d3&products=nikon_d4&sortDir=ascendingyou get a very useful view. I can sit down write this library function now but don't have the time at this moment. But I'm sure someone out there has either the time for it, or already has written it. Would you please share it please? getview ($dbh,"select * from tableX where 1=1","vertical");
 
Back
Top