Jump to content

tzurielk

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tzurielk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have searched thru the forum but didn't find anything that could help me. I have a database with air dates of shows from different years. My query looks like this [code] $res=mysql_query("select DISTINCT * from performance ORDER BY showDate");[/code] The db has the following fields: showID showDate bandID year date Here is the rest of the code: [code]$num=mysql_numrows($res);    while ($row = mysql_fetch_assoc($res)) {         if ($prev_show_val != $row['date']) {         //update the show date here so no dates repeat           $prev_show_val = $row['date'];         echo " ";         echo '<font face=arial size=4 color=#2F4F4F>'  . $row['date']. ''; } }[/code] which successfully prints out only the unique airdates from the db. What i want to do is have the year listed once for each set of airdates from that year so it would display 1975 once and then all the dates from 1975. Then 1976 would display once and all the dates from that year, etc. I'm sure there is an easy solution for this with a nested loop but I can't seem to get it right. Please help! Thanks! Tzuriel
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.