Related Records (in admin) choose which fields to bring in

2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 15, 2014   (RSS)

By zaba - May 1, 2014

Hi I want to populate a related record block but only show certain fields in the related table.

how would I do this? or can I do it?

so the relation ship in the MYSQL where clause is

book_ref='<?php echo mysql_escape(@$RECORD['book_ref']) ?>'

This brings in the all the fields (as columns) in the other table, whereas I only need to show half of them (but all the rows in the relationship).

Is there a way to do a full MySQL SELECT field1, field2, field3, field4 FROM table_name WHERE book_ref='<?php echo mysql_escape(@$RECORD['book_ref']) ?>'

help :-)