Issue with multi records from another table

4 posts by 2 authors in: Forums > CMS Builder
Last Post: April 5, 2010   (RSS)

By theclicklab - March 31, 2010 - edited: March 31, 2010

Hi there, Having issues displaying some data, nothing is showing (blank)

I have a field setup like this:

List (multi value)
Get options from database
Section Table Name: yachts
Use this field for option values: num
Use this field for option labels: yacht_name

In the template I have this to grab the multiple records:

<?php
// Gets list of yachts
$num2 = $nl_multiRecord['yachts'];
if (!$num2) { $num2 = 1; } // default num
list($yachtsRecords, $yachtsMetaData) = getRecords(array(
'tableName' => 'yachts',
'where' => "num LIKE '$num2'", //Gets multiple records
'allowSearch' => '0',
));
?>


And this to print out details:

<?php foreach ($yachtsRecords as $record): ?>
Yacht Name: <?php echo $record['yacht_name'] ?><br/>
<?php endforeach ?>


Any idea why I'm not getting any output? See attached.

Many Thanks!
Attachments:

multi.php 9K

Re: [chris] Issue with multi records from another table

By theclicklab - April 4, 2010

Thanks Chris, much appreciated.

Re: [aquaman] Issue with multi records from another table

By Chris - April 5, 2010

Hi aquaman,

Glad I could help! :)
All the best,
Chris