Where checkbox, limit and random play together

3 posts by 2 authors in: Forums > CMS Builder
Last Post: December 23, 2015   (RSS)

By Damon - December 22, 2015

Hi,

Try this code:

  list($executiveRecords, $executiveMetaData) = getRecords(array(
    'tableName'   => 'executive',
    'where' => "`index` = '1'",
    'limit'       => '1',
    'orderBy'     => 'RAND()',
    'loadUploads' => true,
    'allowSearch' => true,
  ));

Let me know if this works for you.

Cheers,
Damon Edis - interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By crazyfish - December 23, 2015

Perfect.   Thank you very much.