[FX.php List] Saving/Exporting records from search results

Gjermund Gusland Thorsen ggt667 at gmail.com
Sat Jan 26 14:31:15 MST 2008


Or even better do the same thing and use "\n", $tmp and use a
relationship to undig the data after, like this, but then you can not
do the recids from your current found set, but a key that fits your
relationship:
---
unset( $tmp );
foreach( $r['data'] as $k => $v ) {
$tmp[] = $value['commonlyUsedKeyForThisRecordInThisTable'][0];
}
$query->AddDBParam( 'recids', implode( "\n", $tmp) );
---
This will be the simplest way I assume, I typed this just off the top
of my head, so it's not tested but the method should really work.

2008/1/26, Gjermund Gusland Thorsen <ggt667 at gmail.com>:
> I would do the following, in theory, make a table called SearchResults,
>
> searchResultID, autoincrement by one
> recids, text
>
> Then I would do
> ---
> unset( $tmp );
> foreach( $r['data'] as $k ) {
> list($recid,$modid) = explode( '.', $k );
> $tmp[] = $recid;
> }
> $query->AddDBParam( 'recids', implode( ',', $tmp) );
> ---
>
>
> 2008/1/26, Jonathan Schwartz <jschwartz at exit445.com>:
> > Hi Folks,
> >
> > This is a scaled-down repeat of a post from earlier this week.  I
> > didn't get any replies to that post, and I'm still seeking a solution.
> >
> > In short, I need to be able to export the records from a
> > user-generated query into a second table. I have tried 2 methods.
> > One is slow. The other doesn't work.
> >
> > #1: Run a php script to loop through each record with FMNew. It took
> > over a minute to generate 1200 records and pegs the meter. This is
> > with the fields reduced to just the record ID.
> >
> > #2: Run a script to have FMP export the records and then import into
> > the second db.  I now realize that this won't work because neither
> > Export or Import are Web Compatible.
> >
> > So I'm back to #1... or another method I haven't thought of yet.
> >
> > Any suggestions?
> >
> > Jonathan
> >
> >
> > --
> > Jonathan Schwartz
> > Exit 445 Group
> > jonathan at exit445.com
> > http://www.exit445.com
> > 415-381-1852
> > _______________________________________________
> > FX.php_List mailing list
> > FX.php_List at mail.iviking.org
> > http://www.iviking.org/mailman/listinfo/fx.php_list
> >
>


More information about the FX.php_List mailing list