February 14, 201114 yr 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!
January 30, 201213 yr To return ALL the records for your query, set the third parameter for SetDBData to 'All' ex: $FXQuery->SetDBData('ComCentral.fp7', 'Personnel All', 'All');
Create an account or sign in to comment