2 posts by 2 authors in: Forums > CMS Builder
Last Post: June 3   (RSS)

Hi Koen,

The general way I would accomplish this would be to:

  1. Set up a List Page and Details Page for the Models table using the CMSB Code Generator
  2. Modify the Models Detail Page to also list associated repairs.

#2 can be done in a number of ways. I would recommend starting with a modified getRecords() call that could look something like this:

list($repairsRecords, $repairsMetaData) = getRecords(array(
  'tableName'   => 'repairs',
  ... (your options here)
  'where' => "num = '" . mysql_escape($modelsRecord['repair'])."'",
));

The above would need to be modified to fit your table/variable/field names but hopefully gives you a starting point.

Let me know if the above makes sense, or if I can help clarify anything.

Thanks,

Daniel
PHP Programmer
interactivetools.com