MySQL Forums
Forum List  »  PHP

Re: Format query results [php codeignter]
Posted by: Peter Brawley
Date: August 12, 2016 06:35PM

The query must order values on the date column. Now, above the fetch loop ...

$date="";

Then within the fetch loop, assuming the date value of the just-fetched row is in $row["date"] ...

  if( $row["date"] != $date ) {
    // code to display date header for this date
    $date = $row["date"];
  }
  // display event data for this row on a new display row

Options: ReplyQuote


Subject
Written By
Posted
Re: Format query results [php codeignter]
August 12, 2016 06:35PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.