[FX.php List][OFF] posting an email address
Roger Price
rp272 at cam.ac.uk
Wed Apr 16 14:53:12 MDT 2008
Andrew
Yes, I followed Gjermund's suggestion of setting the email field to unicode, which seems to have fixed the problem.
I have subsequently read with interest the plethora of debate that my simple query seems to have generated. Not least my careless use of the term 'primary key', so erhaps this might stimulate some more.
I may lose a few friends here when I say that Filemaker of course cannot be considered a 'true' relational database because it does not make the setting of a 'primary key' mandatory (among other things).
Don't get me wrong FileMaker is still the database I use from choice for its ease and quickness of development. A FileMaker database can be configured to simulate a 'primary key' by requiring unique values but this is not enforced. Of course it can be a positive advantage to relax the rules regarding 'foreign' keys for example which are supposed to only exist if they refer to a primary key in another table! The configuration of a portal may display records where a related key is found in an associated table (or using a self-join)and show nothing if the required value cannot be found. I don't think that this would be possible with an SQL database.
Filemaker of course does use a primary key (recid) but this is not user defined or controlled. It is this key that FX.php uses to uniquely identify a record that is to be edited or deleted. However that is not quite the same thing.
What does the group think?
Roger
----- Original Message -----
From: Andrew Denman
To: 'FX.php Discussion List'
Sent: Wednesday, April 16, 2008 9:16 PM
Subject: RE: [FX.php List] posting an email address
Preventing the @ sign from becoming a wildcard is why the double quotes are needed! With just the double equal signs the @ sign is still acting as a single character wildcard and will match any text with a single character between adenman and tmea.org (in my example). The double quotes make FileMaker treat everything between them as regular text during the search.
Though the situations where this particular example would cause a problem are rare or nonexistent, it is something that can cause unintended behavior in the application. If the problem does occur then time must be taken to figure out and fix it. Squash the bug before it is a problem.
Roger, did you get the problem you were encountering fixed?
Andrew Denman
From: fx.php_list-bounces at mail.iviking.org [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Bob Patin
Sent: Monday, April 14, 2008 5:18 PM
To: FX.php Discussion List
Subject: Re: [FX.php List] posting an email address
Andrew,
I suppose that's true, but it's never been a problem for me, since no one ever enters their email address as "adenmanxtmea.org".
What my code does is keep the @ sign from becoming a wildcard, and for that it works fine. I can't imagine ever needing to enclose the whole thing in double quotes...
But that's just me... :)
BP
On Apr 14, 2008, at 3:29 PM, Andrew Denman wrote:
A small correction to Bob's code:
$query->AddDBParam('email','=="'.$email.'"');
The @ character is a special search character in FileMaker (match one
character), so to use it as your data you must enclose it in the double
quotes (signifies literal text). You can see all the special search
characters by doing a find in FileMaker and clicking the Symbols arrow in
the status area on the left. You can also try out your finds in FileMaker to
see what shows up and experiment with them; it's easier to troubleshoot than
having to change the coding on web pages.
The reason the quotes are needed is that with the double equals and without
the quotes will match both of these:
adenman at tmea.org
adenmanxtmea.org
Andrew Denman
------------------------------------------------------------------------------
_______________________________________________
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://www.iviking.org/pipermail/fx.php_list/attachments/20080416/e58bad44/attachment-0001.html
More information about the FX.php_List
mailing list