[FX.php List] RECID anomaly, more info

Dale Bengston dbengston at preservationstudio.com
Sat Mar 8 16:17:19 MST 2008


Bob,

I promise I won't use the word "log" or "file" anywhere in this  
reply. ;-)

When the session times out, the FX query is searching for contact id =  
nothing. Unfortunately, a busted search in FX retrieves *all* the  
records in the table, not *no* records. (This one of my least favorite  
characteristics of the FX class.) I'm betting the FMFind() is set to  
retrieve one record, so the broken search finds all, returns first.  
The recID is picked up from that first record. Subsequent edits happen  
to that record.

If you echo the FX queries to the screen temporarily, you will see the  
search as it's sent to by FX to FMP.

Philosophically, there isn't much point to setting a session ID to the  
contact ID and then using that to search the record id out before each  
form/edit. The record id could be retrieved at the onset, and passed  
from page to page with POST, which avoids session timeouts.

Hope this helps,
Dale

On Mar 8, 2008, at 1:30 PM, Bob Patin wrote:

> I think I finally figured out what this web app is doing:
>
> Contrary to how *I* would do this, the original coder would retrieve  
> the contactID before loading each and every form. He stored the  
> contactID in a session variable, and then before loading each form,  
> he put an include in the page that would retrieve the session  
> variable and query the database for the proper RECID for this client.
>
> So I assume the sessions are timing out after all...
>
> My question though is this: if the session times out, then the query  
> for the user's contactID should fail, and if that happens, the RECID  
> doesn't get returned.
>
> If there's no value in the RECID, then why is FMEdit writing to the  
> first record in the table?
>
> Bob Patin
> Longterm Solutions
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> Member of FileMaker Business Alliance and FileMaker TechNet
>
>  CONTACT US VIA INSTANT MESSAGING:
>     AIM or iChat: longterm1954
>     Yahoo: longterm_solutions
>     MSN: tech at longtermsolutions.com
>     ICQ: 159333060
>
> --------------------------
> Contact us for FileMaker hosting and programming for all versions of  
> FileMaker
> PHP • CDML • Full email services • Free DNS hosting • Colocation •  
> Consulting
>
> _______________________________________________
> 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