RE: [PHP] Array newbie
| From: | Krznaric Michael | Date: | Fri, 04 Aug 2000 18:50:40 +0000 |
| Subject: | RE: [PHP] Array newbie | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10179@lists.php.net to get a copy of this message | ||
Ahhh, I see now. So now we're back at the original question. I'm gona
phrase my assumptio again so you know what I think this is about. I went to
your webiste and read your intro, I've also reread our thread. I think your
origninal approach is good. Check the name, address and CSZ individually
and then increase the score as appropriate. You originally wanted to use
three arrays and then check if they had common keys. You were worried that
your arrays would get too big? Do I understand your problem properly?
If this is what your problem is, the only thing I can suggest is to
consider a HASH table? It seems that from the nature of your problem, you
have to do some heavy computation either way. The only thing you can try is
to make the best of it. What approach are you considering?
-----Original Message-----
From: David VanHorn [mailto:dvanhorn@cedar.net]
Sent: Friday, August 04, 2000 2:22 PM
To: Krznaric Michael
Subject: RE: [PHP] Array newbie
At 01:43 PM 8/4/00 -0400, Krznaric Michael wrote:
>David,
>
> I know understand your problem however I'm still not sure what
type
>of SQL statement you are using. There doesn't seem to be any clear
relation
>between spam name, spam address and spam city. However the least you can
do
>is
They are tied together by the reference field. (IOW: name(2) and
(address(2) and CSZ(2) go together)
I have to treat each part differently, especially the name.
While I could pull up just literal matches, that would give me problems
where dave, davey, and david are the same person.
So, for names, I pull up * where soundex first and last match the soundex
of the query names.
If I get anything, then I set one score level.
Then I spin through looking for literal matches on last name, if so, I
boost the score.
Finally, I spin through looking for literal on first and last. If so, I
boost again, if not, then I leave it as before.
So my dilemma, is how to set a variable, dependent on wether I get soundex
only, soundex last and literal first, or literal both.
That's JUST for the names.
An identity match occurs when I match name, address, and CSZ, (and of
course the references on the match need to be the same)
You might have people with the same name, and street address, living in
different cities. No match.
You might have people with the same name, different address, same CSZ.
Possible match
You might have people with different names, at the same address and CSZ.
Possible match
--
Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9