Hi,
i see that the customer_id is always the same (WHERE customer_id = '" . $_GET['id'] tell this...). Then just look for the date.
You memorize at each loop the old date and compare with new before to change the color:
if ($olddate!=$order_date){
if ($alternate == "1") {
$color = "#ffffff";
$alternate = "2";
} else {
$color = "#efefef";
$alternate = "1";
}
$olddate=$order_date;
}
If the customer change too you can use the same trick, but you have to order also for customer_id, so near customer may be the same, the far not.
see you