Thank you for your help. I see what you are doing different. I don't understand how the quotient works there. I will sometime. I also don't understand the HEREDOC concept. I wanted colors alternating to allow for a better read. I still have not solved the problem with listing the genre in its own row, alone at the beginning of each section of genre (the start of each unique genre which is the ORDER BY in the statement). Thanks for the code. I need to learn how to write more eloquently like you. If anyone can figure out the a row listing for the genres, that would be soooo cool. "Jim Lucas" <lists@xxxxxxxxx> wrote in message news:45B4E882.5050905@xxxxxxxxxxxx > Here is my rendition of your script. Give it a shot... > > Let me know if you have any question about what is going on. > > I was curious, what is the point of having the alternating column colors? > Was that your intention? > > <?php > > function invlistONE(){ > dbconnect('connect'); > $invlist = mysql_query("SELECT * FROM sp_dvd > ORDER BY dvdGenre"); > > > echo <<<HEREDOC > > <style type="text/css"> > .dvdDisplay th { > font-size: 9pt; > text-align: left; > } > .dvdDisplay td { > font-size: 8pt; > } > </style> > > <table cellspacing="0" id='dvdDisplay"> > <thead> > <tr> > <th width="20" class="body">DVD ID</th> > <th width="225">TITLE</th> > <th width="75" class="body">GENRE 1</th> > <th width="75">GENRE 2</th> > <th width="75" class="body">GENRE 3</th> > <th width="10">ACT</th> > <th width="10" class="body">QTY</th> > <th width="10">BCK</b></th> > <th width="10" class="body">HLD</th> > <th width="10">INC</b></th> > <th width="50" class="body">OG USR</th> > <th width="30">OUT DATE</th> > <th width="55" class="body">OUT USR</th> > <th width="30">IN DATE</th> > <th width="50" class="body">IN USR</th> > <th width="10">CY</th> > </tr> > </thead> > <tbody> > > HEREDOC; > > $count = 0; > while ( $row = mysql_fetch_array( $invlist ) ) { > > if ( $count % 1 ) { > $rowColor = '#c1c1c1'; > } else { > $rowColor = ''; > } > > echo <<<HEREDOC > > <tr bgcolor="{$rowColor}"> > <td class='body'>{$row['dvdId']</td> > <td>{$row['dvdTitle']}</td> > <td class='body'>{$row['dvdGenre']}</td> > <td>{$row['dvdGenre2']}</td> > <td class='body'>{$row['dvdGenre3']}</td> > <td>{$row['dvdActive']}</td> > <td class='body'>{$row['dvdOnHand']}</td> > <td>{$row['backordered']}</td> > <td class='body'>{$row['dvdHoldRequests']}</td> > <td>{$row['incomingInverntory']}</td> > <td class='body'>{$row['ogUserId']}</td> > <td>{$row['outDate']}</td> > <td class='body'>{$row['outUserId']}</td> > <td>{$row['inDate']}</td> > <td class='body'>{$row['inUserId']}</td> > <td>{$row['cycles']}</td> > </tr> > > HEREDOC; > > $count++; > > echo '</tbody></table>'; > } > } > > ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php