Team,
I have searched the internet and found many samples of alternating row color when retrieving from MySQL. I have attempted many times to try these and have failed. I would appreciate someone taking the time to review my posted script, and showing me where I need to put what. I’d like to learn, but I’m getting frustrated here. Thank you in advance for your help.
[php] <?php
$table = ‘POs’;
if (!mysql_select_db($database))
die(“Can’t select database”);
// sending query
$result = mysql_query(“SELECT * FROM {$table}”);
if (!$result) {
die(“Query to show fields from table failed”);
}
$fields_num = mysql_num_fields($result);
$color = 0;
echo “
{$field->name} | ”;