Songs "") { echo " containing \"$title_pattern\""; } if ( $chosen_by <> "") { echo " chosen by \"$chosen_by\""; $query="SELECT Title, source, songs.song_id, DATE_FORMAT(date, '%D %b %Y') FROM songs INNER JOIN performance where Title like '%$title_pattern%' and performance.chooser = '$chosen_by' and songs.song_id = performance.song_id order by Title"; $date_header = "Date sung"; ##$date_header = "Last sung"; } else if ($performance_date <> "") { # Date in a more readable format echo " used on ", date("l, jS F Y", strtotime($performance_date)); $query="SELECT Title, source, songs.song_id, DATE_FORMAT(date_last_performed, '%D %b %Y'), date FROM songs INNER JOIN performance where Title like '%$title_pattern%' and performance.date = '$performance_date' and songs.song_id = performance.song_id order by performance.date"; # We show the date last performed as we already know the date of the performance we're interested in - it's at the top of the page. $date_header = "Date last used"; } else { $query="SELECT Title, source, song_id, DATE_FORMAT(date_last_performed, '%D %b %Y') FROM songs where Title like '%$title_pattern%' order by date_last_performed desc"; $date_header = "Date last used"; } ?>

"") { $date=mysql_result($result,$i, "DATE_FORMAT(date, '%D %b %Y')"); } else { $date=mysql_result($result,$i, "DATE_FORMAT(date_last_performed, '%D %b %Y')"); } $performance_date= date("Y-m-d", strtotime($date)); echo ""; echo ""; echo ""; ## if ($date == "0000-00-00" || $date == "") { if ($date == "1st Jan 1900" || $date == "") { $date = "(never)"; echo ""; } else { echo ""; } echo ""; $i++; } ?>
Title Source
$Title$source$date$date

Instructions

  • Click on the column headings to sort. Click again to reverse sort.
  • Click on a song title to see details.
  • Click on a date to see other songs on that date
  • Click on a person to see other songs chosen by them
  • Search