Page 1 of 1

Help: Photos of a listing

PostPosted: 02 Nov 2017, 23:22
by abrahannunez
Hi guys,

Does anybody can help me, I need to query all the photos of a listing to make a second gallery on my property view page.

Thanks in advance.

Re: Help: Photos of a listing

PostPosted: 03 Nov 2017, 08:59
by Xpycm
Hello.

Code: Select all
SELECT idfile_namefile_name_modified FROM {{images}} WHERE id_object MY_ID_OBJECT ORDER BY sorter


or in model:
Code: Select all
foreach($model->images as $image) {
... do 
something

Re: Help: Photos of a listing

PostPosted: 03 Nov 2017, 22:28
by abrahannunez
Thanks for your help, it's works.