Need assistance combining content from two sections

3 posts by 2 authors in: Forums > CMS Builder
Last Post: July 25, 2008   (RSS)

Re: [kevbarker] Need assistance combining content from two sections

By Dave - July 24, 2008

Hi Kevin,

Ok, I think I know what you want. Give this a try... Note that I don't know your fieldnames or variable names so just replace (or adapt) what I use in my examples with the names in your page.

On your order detail page add another list viewer to the bottom and tell it to only show records matching the record number. Like this:

<?php
require_once "admin/lib/viewer_functions.php";

list($shortagesRecords, $shortagesMetaData) = getRecords(array(
'tableName' => 'shortages',
'loadUploads' => '0',
'allowSearch' => '0',
'where' => "orderNum = '{$order['num']}'"
));

?>

...

<?php if (@$shortageRecords): ?>
<?php foreach ($shortageRecords as $shortage): ?>
Title: <?php echo $shortage['title'] ?><br/>
...
<?php endforeach ?>
<?php endif ?>


Let me know if that makes sense. :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Need assistance combining content from two sections

By kevbarker - July 25, 2008

That worked great!

Thanks,
Kevin