Change Sort Order

3 posts by 2 authors in: Forums > CMS Builder
Last Post: October 17, 2008   (RSS)

By avrom - October 16, 2008

Hi Dave,

I currently have a set of records displaying as a menu... Its the "schedules" menu on the left hand side:

http://www.firstaidforbc.com/course_schedules.php

Currently they are sorted by the order in the editor... date added. But I want to display them in order of their name. Here is the code I have on my web page:

list($course_schedulesRecords, $course_schedulesMetaData) = getRecords(array(
'tableName' => 'course_schedules',
'loadUploads' => '0',
'allowSearch' => '0',
));

And the menu part:

<?php foreach ($course_schedulesRecords as $record): ?>
<?php if ($record['display']): ?>
<p><a class="noLinkBold" href="<?php echo $record['_link'] ?>"><?php echo $record['course_name'] ?></a></p>
<?php endif ?>
<?php endforeach; ?>

Thanks Dave !! :))

Re: [Dave] Change Sort Order

By avrom - October 17, 2008

Thanks Dave ;)) worked perfectly...

Sorry I haven't been in touch, its been busy here :)) yes even in the middle of nowhere LOL