Jump to content

Pulling all records from a portal in a layout...not just one


sstarosciak
 Share

This topic is 4026 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hey there, so I was given the task of modifying an existing application that uses filemaker as the database, and I'm having trouble getting my result sets. I have this function:

function showPersonnelResearch() {

$ID = "121";

parse_str($_SERVER['QUERY_STRING']);

// Connect to the filemaker database

$FXQuery = new FX('128.163.47.206', 80, 'FMPro7');

$FXQuery->SetDBData('ComCentral.fp7', 'Personnel All');

$FXQuery->FlattenInnerArray();

$FXQuery->AddDBParam('ID', $ID, 'eq');

// Query to get the results

$ReturnedData = $FXQuery->FMFind(true, 'full', false);

// Ensure the faculty member has research to publish

echo ("<h1>Current Research</h1>\n");

// Go through each piece of data and print out the corresponding studies

foreach($ReturnedData['data'] as $record)

{

//print_r($record);

/* echo '<div style="margin-bottom:10px;">

<div style="font-weight:bold;font-size:14px;">' . $record['Research Studies::research_title'] . '</div>

<div style="margin-top:5px;"><span style="font-weight:bold;margin-right:5px;">Researcher:</span>' . $record['Research Studies::principal_investigator'] . '</div>

<div style="margin-top:5px;"><span style="font-weight:bold;margin-right:5px;">Sponsor:</span>' . $record['Research Studies::sponsor'] . '</div>

<div style="margin-top:5px;"><span style="font-weight:bold;margin-right:5px;">Dates:</span>' . date("F j, Y", strtotime($record['Research Studies::start_date'])) . ' - ' . date("F j, Y", strtotime($record['Research Studies::end_date'])) . '</div>';

if ($record['Research Studies::publication_url'] != '')

{

echo '<div style="margin-top:5px;"><span style="font-weight:bold;margin-right:5px;">Publication URL:</span><a href="' . $record['Research Studies::publication_url'] . '">' .

$record['Research Studies::publication_url'] . '</a></div>';

}

echo '</div>';*/

}

}

Inside of filemaker, I have a "Personnel All" layout and in that layout is a portal to another table that contains research records. I'm able to get all the information from the layout, but only the last record that was entered in the table that is linked to the portal is being returned. Is there a way I'm supposed to format my query so that I get all of the records from the portal table? Anyway, thanks in advance!

Link to comment
Share on other sites

  • 11 months later...

This topic is 4026 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.