Mysql 'where' record has upload

2 posts by 2 authors in: Forums > CMS Builder
Last Post: August 5, 2016   (RSS)

By dm - July 28, 2016

hi

for some random featured listings on a home page i am limiting a list of records to 3 but i want to only display records where the upload field called "photos" has photos uploaded

is there a way to add to the 'where' clause below to achieve this via the mysql?

list($propertyRecords, $propertyMetaData) = getRecords(array(
'tableName' => 'property',
'limit' => '3',
'orderBy' => 'RAND()',
'loadUploads' => true,
'allowSearch' => false,
'useSeoUrls' => true,
'where' => "collection = '1'".' AND '."hide_property = '0'",
));

many thanks for the support!