[FX.php List] RECID anomaly, more info
Bob Patin
bob at patin.com
Sat Mar 8 16:54:19 MST 2008
On Mar 8, 2008, at 5:17 PM, Dale Bengston wrote:
> 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.
So are you saying that if I do a search for contactID #123, and it
doesn't exist, that ALL records are in reality returned?
The original programmer didn't have any sort of error coding, so there
wasn't a test to see if the FIND actually succeeded. So are you saying
that because he didn't have any error testing, in reality the first
record was returned?
Wow, that sucks... :)
I would've thought that if a FIND failed, the foundset would be empty.
So that explains it...
>
> 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.
Exactly, which is how I do it. This guy wrote a mess, and he's someone
who's very well-known in the FM community (no, it's not our buddy
Stephen K), who I would've thought would write better code. To make
matters worse, he quit returning calls to his client, which is when
she found me... perhaps there's another side to the story, but to me,
it's unforgiveable to quit returning calls. Fire the client, sure, but
don't just quit answering.
Anyway, thanks for your answer...
BP
More information about the FX.php_List
mailing list