i think php is better if you have so many rows, here is a simple one in php hope this helps!! [code] <?php $query = "SELECT * FROM table"; $result = $dbh->query($query); // output query into a table echo "<br><br><table border=0>\n"; // fetch rows as object example if you only have 2 rows: printf ("%s, %s\n", $row->rowname1, $row->rowname2); while($row = $result->fetchRow(DB_FETCHMODE_OBJECT)) { // alternate table color output if($x%2): $color = "#eee"; else: $color = "#cecece"; endif; // output row values, rows are fetch as object printf("<tr><td style=\"background-color: ".$color. "\">%s</td><td style=\"background-color: ".$color."\">%s</td></tr>\n", $row->rowname1, $row->rowname2); $x++; } echo "</table>\n"; ?> [/code]