Issues with RAND()
A for , submitted by brendo on 22 January 2010
Announcement
Symphony's issue tracker has been moved to Github.
Issues are displayed here for reference only and cannot be created or edited.
Browse
Closed#213: Issues with RAND()
It’s always been ‘rand’, but it would appear that developers have been implementing their fields looking for ‘random’.
I have changed the DS editor. It will write ‘random’ instead of ‘rand’. http://github.com/symphony/symphony-2/commit/f4a4e08b218c33805fb95ced1bbb8dffa2263631
This issue is closed.
Found an interesting issue today in that the Datasource use the keyword
rand
value to when the sort option is chosen as Random.Although it seems that some extensions are looking for
random
, notrand
:$sort = 'ORDER BY ' . (strtolower($order) == 'random' ? 'RAND()' : "ed.value {$order}");
This doesn’t affect the core extensions, as they use:
$sort = 'ORDER BY ' . (in_array(strtolower($order), array('random', 'rand')) ? 'RAND()' : "
ed.
relation_id$order");