[FX.php List] Alternate grammar?

Nick whatdoyouwant at gmail.com
Thu Feb 7 12:42:55 MST 2013


If you're starting a new project using FM Server 12 (and you use portals on
your layouts), it is advisable to set $myQuery->usePortalIDs = true;
the difference is that portals have their record id/modid instead of zero
through x.

That means that instead of using a for loop, use a foreach loop to walk
through the portal records (which is backwards compatible with the old way
as well).

foreach ( $record['PortalTable::IDField'] as $portalkey => $portalIDData)
{
  echo $record['PortalTable::OtherField'][$portalkey];

// only now portalkey is not 0 or 1, etc.  It is recordnumber.modID like
the ['data'] array.
  $portalTable_recordinfo = explode('.', $portalkey);
  $portalTable_recordid = $portalTable_recordinfo[0];
// if you wanted to loop through and edit, or something, use the recordID.

}


usePortalIDs is set to false currently in order to maintain backwards
compatibility with the old code, for people that would use a for loop.


On Thu, Feb 7, 2013 at 10:03 AM, Michael McIntyre <aragon at umich.edu> wrote:

> To answer my own question, fmresultset.xml grammer can be invoked from
> the initial FX call,
>   $myQuery = new FX($dbIP,$dbPort,$dbType);
> where $dbType='fmalt';
>
> This would be an excellent addition to the PDF documentation.
>
> ~Michael
>
> On Mon, Jan 28, 2013 at 4:13 PM, Michael McIntyre <aragon at umich.edu>
> wrote:
> > What config (in which files) is needed to invoke the fmresultset.xml
> grammer
> > & RetrieveFM7VerboseData.class.php?
> >
> > I set $dataServerType = 'fmalt' to no avail...
> >
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20130207/76a30d67/attachment-0001.html


More information about the FX.php_List mailing list