Only showing unique days

flyboeing 01 Sep, 2011
Hello all,

I have a database with information about airport movements. I have the following columns (I am just showing you the first 3 columns, otherwise it will be to large to show😛

I am using the following columns:
- Date
- Registration
- Aircraft

In the Date column I am just showing the day (1, 2, 3, etc). When hovering the daynumber you will see the full date (day, month and year).

Day 1 has 10 rows, day 2 has 8 movements, but each row is showing the daynumber. Is it possible to just show the daynumber on the first row and the rest of the rows of that day not showing the daynumber?

Like this:
Only showing unique days image 1

Can someone help me with this?
GreyHead 01 Sep, 2011
Hi flyboeing,

We did this once before, I think that the code you need is like this (will need some tweaking).

In the Header box:
<?php
global $last_daynumber;
$last_daynumber = 9999;
?>

In the Body Box:
<?php
global $last_daynumber;
$this_daynumber = $MyRow->some_column_name;
if ( $this_daynumber == $last_daynumber ) {
  $daynumber = '-';
} else {
  $daynumber = $this_daynumber;
  $last_daynumber = $this_daynumber;
} 
?>
. . .
<?php echo $daynumber; ?>
. . .

Bob
flyboeing 01 Sep, 2011
Thank you Greyhead.
I will try tonight.

EDIT:
I just tried it and it works🙂 Thank you.
This topic is locked and no more replies can be posted.