Background: I have a script that I had someone else to create for me that is not quite working right. I no longer have access to the person who created the script and it’s not quite outputting the information correctly. The database contains events that consist of one or more days.
The script outputs records grouped by year then by month then orders records by the day of the month (first day of the event if the event spans more than one day).
The script is grouping the records by year and month okay but not by date. I am a graphics person and only have a basic understanding of PHP. I’ve tried various ways of formatting the output of the beginning date (details_date) in the order by statement but the results are never what I want.
Here’s some of the database field structure:
details_id int(11) NOT NULL auto_increment,
details_end_date date default NULL,
details_date date NOT NULL default ‘0000-00-00’,
Here’s the script:
[php]
" . $row['years'] . " Itinerary
" . $row1['Month'] . "
"); echo (" " . $getRecord['details_church']); echo "
"; echo (" " . $getRecord['details_city_state']); echo "
"; if($getRecord['details_pastor'] > " ") { echo (" " . $getRecord['details_pastor']); echo "
";}; if($getRecord['details_phone'] > " ") { echo (" " . $getRecord['details_phone']); echo "
";}; if($getRecord['details_link'] > " ") { echo (" " . $getRecord['details_link']); echo "";}; echo ("
"); } } } include("closedb.php"); ?>
[/php]
Here’s the results: http://www.sansom.net/scripts/itinerary.php
As you can see, some events are appearing at the end of the group for that month when they should be at the beginning. It’s obvious I’m missing something simple or just too ignorant to understand what I’m doing wrong but appreciate any help on this subject.