Hi,
For the life of me, I can't figure out how to randomize results from an ORM query. The API tells me this...
order_by( $property, $direction = ASC ) :
If I put anything but a column for the property, I get something like this:
Fuel\Core\Database_Exception [ 1054 ]: Unknown column 't0.RAND()' in 'order clause' [ SELECT `t0`.`design_id` AS `t0_c0`, `t0`.`design_file` AS `t0_c1`, `t0`.`designer` AS `t0_c2` FROM `designs` AS `t0` ORDER BY `t0`.`RAND()` ASC ]
Should I be using something else? The only discussion of "random" in the ORM API is for randomizing count()
Thanks!
- Calvin
The query builder's identifier quote method can't deal with functions without parameters (it identifies a function by looking for a double quote, not by brackets).
I suggest you'll report this as an issue https://github.com/fuel/core/issues so it can be looked at.