Posted by 0plus1 on July 30, 2010 at 9:55am
I'm creating a view to use with amfphp with the view.get service.
The content I'm trying to show has 3 fields that can contain several images each.
I made a relation with the fid of the field that holds the images, then I added a field of type file with the relation to the fid, it works but it duplicates the content (if a node has 3 images the node will show three time with the same name and with the different files). Ho can I do it so that the files will be shown inside an array under the node?
The query:
SELECT node.nid AS nid, node.title AS node_title, node.language AS node_language, files_node_data_field_colori.filename AS files_node_data_field_colori_filename, node.nid AS node_nid FROM node node LEFT JOIN content_field_colori node_data_field_colori ON node.vid = node_data_field_colori.vid LEFT JOIN files files_node_data_field_colori ON node_data_field_colori.field_colori_fid = files_node_data_field_colori.fid WHERE (node.status <> 0 OR (node.uid = ***CURRENT_USER*** AND ***CURRENT_USER*** <> 0) OR ***ADMINISTER_NODES*** = 1) AND (node.type in ('prodotto')) ORDER BY node_nid ASCI hope I explained myself well.
Thanks