<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>List by month</title>
        <link>https://interactivetools.com/forum/forum-posts.php?List-by-month-82474</link>
        <description></description>
        <pubDate>Wed, 13 May 2026 21:58:32 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;List-by-month-82474" rel="self" type="application/rss+xml" />

                <item>
          <title>List by month</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2245713#post2245713</link>
          <description><![CDATA[<p>Hey rez,</p>
<p>This method looks fine! Though as you note, it would have issues if you were to enter dates across multiple years. When generating $theMonth you could probably just use "F Y" instead of "F" to account for the year if that's ever necessary.</p>
<p>I'd also recommend adding an "orderBy" option to your getRecords() to sort by show_date - something like this:</p>
<pre class="language-php"><code>list($dancer_scheduleRecords, $dancer_scheduleMetaData) = getRecords(array(
'tableName' =&gt; 'dancer_schedule',
'loadUploads' =&gt; true,
'allowSearch' =&gt; false,
'where' =&gt; " show_date &gt;= CURDATE() ",
'orderBy' =&gt; "show_date ASC",
));
</code></pre>
<p>If you create the records in chronological order the default sorting will <em>usually</em> work, but it's not guaranteed, and this grouping method won't work correctly if any records are out of date order.</p>
<p>Let me know if you have any other questions!</p>
<p>Thanks,</p>]]></description>
          <pubDate>Thu, 11 Nov 2021 13:11:05 -0800</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2245713#post2245713</guid>
        </item>
                <item>
          <title>List by month</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2245701#post2245701</link>
          <description><![CDATA[<p>Oh, thanks. I'll look into it.</p>]]></description>
          <pubDate>Sat, 30 Oct 2021 17:49:27 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2245701#post2245701</guid>
        </item>
                <item>
          <title>List by month</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2245700#post2245700</link>
          <description><![CDATA[<p>Hi Rez,</p>
<p>Do a google search for MySQL group records by month and look into the Group By function</p>
<p>You may find some interesting ideas</p>
<p>Jerry Kornbluth</p>]]></description>
          <pubDate>Thu, 28 Oct 2021 19:00:03 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2245700#post2245700</guid>
        </item>
                <item>
          <title>List by month</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2245699#post2245699</link>
          <description><![CDATA[<p>Actually, by some miracle, I managed to get this working from a sort of related example here. I thought this would be more difficult and using arrays. I don't know how it holds up if I was to put a 2 year schedule or something (probably won't ever happen). Look ok? If this is an old way and you would use arrays or some other CMSB function I don't know about, feel free to show me a more powerful way. Thanks.</p>
<pre class="language-markup"><code>&lt;?php $monthCheck = ""; ?&gt;
&lt;?php foreach ($dancer_scheduleRecords as $record):
$showMonth = false;
$theMonth = date("F", strtotime($record['show_date']));
if ($theMonth != $monthCheck) :
$monthCheck = $theMonth;
$showMonth = true;
endif;
?&gt;
	&lt;?php if ($showMonth): ?&gt;
		&lt;strong&gt;&lt;?php echo $theMonth; ?&gt;&lt;/strong&gt;&lt;br /&gt;
	&lt;?php endif ?&gt;
	&lt;strong&gt;&lt;?php echo date("D, M jS", strtotime($record['show_date'])) ?&gt;: &lt;/strong&gt;
	&lt;?php echo join(', ', $record['dancers:labels']); ?&gt;&lt;br&gt;
&lt;?php endforeach ?&gt;</code></pre>]]></description>
          <pubDate>Thu, 28 Oct 2021 17:41:00 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2245699#post2245699</guid>
        </item>
                <item>
          <title>List by month</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2245698#post2245698</link>
          <description><![CDATA[<p>I have 2 editors.</p>
<p><span>editor 1: dancer_schedule</span><span> - show_date, dancers (checkbox list from editor 2)</span></p>
<p><span>editor 2: dancers - name, photo, content</span></p>
<p>In editor 1:</p>
<p>Show Date: calendar picker, you select month, day, year</p>
<p>Dancer Selection: checkbox list of 5 dancers,  coming from editor 2</p>
<p>Announcement: just a text field for any notes</p>
<p>I want the viewer to display on the page like this:</p>
<p>NOVEMBER</p>
<p><strong>Thu, Nov 4th: </strong><span>Jen, Haley</span><br /><strong>Fri, Nov 5th: </strong><span>Haley, Jessica</span><br /><strong>Sat, Nov 6th: </strong><span>Jessica</span><br /><strong>Thu, Nov 11th: </strong><span>Rachel, Jen</span></p>
<p>DECEMBER</p>
<p><strong>Thu, Dec 2nd: </strong><span>Rachel, Jen</span><br /><strong>Fri, Dec 3rd: </strong><span>Haley</span><br /><strong>Sat, Dec 4th: </strong><span>Haley</span><br /><strong>Thu, Dec 9th: </strong><span>Jen, Jessica</span><br /><strong>Fri, Dec 10th: </strong><span>Jen</span></p>
<p><span>I can get a simple list to display easily but I don't know how to get them to display by month, under a month title like above.</span></p>
<pre class="language-markup"><code>list($dancer_scheduleRecords, $dancer_scheduleMetaData) = getRecords(array(
'tableName' =&gt; 'dancer_schedule',
'loadUploads' =&gt; true,
'allowSearch' =&gt; false,
'where' =&gt; " show_date &gt;= CURDATE() ",
));


list($dancersRecords, $dancersMetaData) = getRecords(array(
'tableName' =&gt; 'dancers',
'loadUploads' =&gt; true,
'allowSearch' =&gt; false,
));



&lt;?php foreach ($dancer_scheduleRecords as $record): ?&gt;

&lt;strong&gt;&lt;?php echo date("D, M jS", strtotime($record['show_date'])) ?&gt;: &lt;/strong&gt;
&lt;?php echo join(', ', $record['dancers:labels']); ?&gt;&lt;br&gt;

&lt;?php endforeach ?&gt;</code></pre>]]></description>
          <pubDate>Thu, 28 Oct 2021 13:51:18 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2245698#post2245698</guid>
        </item>
              </channel>
    </rss>
  