Thanks for the reply! I wasn't able to get this to solve it but I did get a little further.
TEST 5:
The result was more than just one event showing per day but not all events are showing. http://www.codyhorsesale.com/saddlemule/eventtest5.php
Number of events per day:
mon - 2 events (# of events actually showing = 1)
tue - 3 events (# of events actually showing = 3)
wed - 3 events (# of events actually showing = 2)
thu - 3 events (# of events actually showing =2)
fri - 3 events (# of events actually showing = 1)
sat - 5 events (# of events actually showing = 1)
sun - 2 events (# of events actually showing = 1)
I tried this - but then none of the events showed up
If I used WHERE (CONCAT(',', `day_of_event`, ',') LIKE '%,fri,%')
repeated this for mon, tues only.
// load records from 'event_schedule2'
list($event_schedule2Records, $event_schedule2MetaData) = getRecords(array(
'tableName' => 'event_schedule2',
'where' => "CONCAT(`day_of_event` LIKE '%\tmon\t%')",
'loadUploads' => true,
'allowSearch' => false,
'debugSql' => true,
));
// load records from 'event_schedule2'
list($event_schedule2Records, $event_schedule2MetaData) = getRecords(array(
'tableName' => 'event_schedule2',
'where' => "CONCAT(`day_of_event` LIKE '%\ttue\t%')",
'loadUploads' => true,
'allowSearch' => false,
'debugSql' => true,
));
Repeated this for each day of the week
<!--/*DAY 1*/-->
<div class="list-title"><h2><?php echo htmlencode($event_schedule_daysRecord['1st_day_of_week']) ?> <?php echo htmlencode($event_schedule_daysRecord['event_month']) ?> <?php echo htmlencode($event_schedule_daysRecord['day_1_date']) ?></h2></div>
<?php foreach ($event_schedule2Records as $record): ?>
<?php if (strpos($record['day_of_event'],"\tmon\t") !== false) : ?>
Day of Event (labels): <?php echo join(', ', $record['day_of_event:labels']); ?><br/>
Title: <?php echo htmlencode($record['title']) ?><br/>
<hr>
<?php endif ?>
<?php endforeach ?>
ETC... for tue, wed, thu, fri, sat, sun
<?php if (!$event_schedule2Records): ?>
No records were found!<br/><br/>
<?php endif ?>
this is the really odd part. On test #7: http://www.codyhorsesale.com/saddlemule/eventtest7.php
The result was 1 event for every day except for the last day which had 2 for sunday, which is correct. I'm SO confused.
Each day is setup as the following: ( mon, tue, wed, thu, fri, sat, sun)
/// load records from 'event_schedule2'
list($event_schedule2Records, $event_schedule2MetaData) = getRecords(array(
'tableName' => 'event_schedule2',
'where' => "(`day_of_event` LIKE '%\tmon\t%')",
'loadUploads' => true,
'allowSearch' => false,
'debugSql' => true,
));
And this is repeated for each day:
<?php foreach ($event_schedule2Records as $record): ?>
<?php if (strpos($record['day_of_event'],"\tmon\t") !== false) : ?>
Day of Event (labels): <?php echo join(', ', $record['day_of_event:labels']); ?><br/>
Title: <?php echo htmlencode($record['title']) ?><br/>
<hr>
<?php endif ?>
<?php endforeach ?>
ETC... for tue, wed, thu, fri, sat, sun
<?php if (!$event_schedule2Records): ?>
No records were found!<br/><br/>
<?php endif ?>