For example in php:
<? $count = 0; while ($row = sqlite_fetch_array($res)) { ?> <tr> <td <? if (($count%2)==0) echo "class=\"even\""; ?>>results </tr> <? $count = $count + 1; } ?>
In this example, the CSS class even formats the table row grey.
Gary
Randall Fox wrote:
Is there an easy way to have an "alternating" column value in a query, using sqlite ?
I want to have a column that alternates its value on every row. The application is web based. I want to alternate colors for each row in a table.. Something row1 = gray background, row2 = white, row3=grey, row4 = white, etc...
Thanks
Randall Fox