random select records where upload field are true

3 posts by 2 authors in: Forums > CMS Builder
Last Post: January 31, 2011   (RSS)

By ht1080z - January 30, 2011

Hi,

I try to select from table "used_items" records where specified upload field "photos" are exist.

list($uirandomRecords, $uirandomMetaData) = getRecords(array(
'tableName' => 'used_items',
'orderBy' => "RAND()",
'where' => 'xxx'
'limit' => '5',
'loadUploads' => '1',
'allowSearch' => '0',
'debugSql' => true,
));
showme($uirandomRecords);


how can i request in the 'where' that only select records which have upload images in the photos field?

Any suggestion would appreciated.

Re: [Jason] random select records where upload field are true

By ht1080z - January 31, 2011

Hi Jason,

Thank you!
Your solution worked perfectly.