Display random and alphabetical order

3 posts by 2 authors in: Forums > CMS Builder
Last Post: April 16, 2009   (RSS)

By avrom - April 15, 2009

Hey Dave,

I realize displaying records in random order is pretty simple:

list($saturna_linksRecords, $saturna_linksMetaData) = getRecords(array(
'tableName' => 'saturna_links',
'limit' => '5',
'orderBy' => 'RAND()',
));

But is it also possible to display those 5 random links in alphabetical order as well ?

Cheers
Avrom

Re: [ross] Display random and alphabetical order

By avrom - April 16, 2009

Hey Ross,

Almost ! Its definitely displaying them in order, but by the record num (date entered). I am sure its a small tweak to change that line of code to make it alphabetical order.

Thanks !! :))

Avrom