RE: [PHP] Re: find (matching) person in other table

2007-06-01 Thread Richard Lynch
core > 0 > > >> -Original Message- >> From: Richard Lynch [mailto:[EMAIL PROTECTED] >> Sent: Thursday, May 31, 2007 3:42 PM >> To: Afan Pasalic >> Cc: Jared Farrish; php-general@lists.php.net >> Subject: Re: [PHP] Re: find (matching) person

RE: [PHP] Re: find (matching) person in other table

2007-05-31 Thread Daevid Vincent
; > from members HAVING score > 0 > -Original Message- > From: Richard Lynch [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 31, 2007 3:42 PM > To: Afan Pasalic > Cc: Jared Farrish; php-general@lists.php.net > Subject: Re: [PHP] Re: find (matching) person i

Re: [PHP] Re: find (matching) person in other table

2007-05-31 Thread Richard Lynch
MySQL doesn't let you use the calculated values (score) in the where clause. PostgreSQL does, as I recall. Sorry. You may be able to get around that with: Do a GROUP BY on something unique, so the GROUP BY is pointless, but then you can use HAVING score > 0 Use a sub-query in MySQL 4.mumble or

Re: [PHP] Re: find (matching) person in other table

2007-05-31 Thread Afan Pasalic
David Giragosian wrote: On 5/31/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: Jared Farrish wrote: > On 5/30/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: > email has to match "in total". [EMAIL PROTECTED] and [EMAIL PROTECTED] >> are NOT the same in my case. >> >> thanks jared, > > If you can

Re: [PHP] Re: find (matching) person in other table

2007-05-31 Thread David Giragosian
On 5/31/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: Jared Farrish wrote: > On 5/30/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: > email has to match "in total". [EMAIL PROTECTED] and [EMAIL PROTECTED] >> are NOT the same in my case. >> >> thanks jared, > > If you can match a person by their ema

Re: [PHP] Re: find (matching) person in other table

2007-05-31 Thread Afan Pasalic
Jared Farrish wrote: On 5/30/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: email has to match "in total". [EMAIL PROTECTED] and [EMAIL PROTECTED] are NOT the same in my case. thanks jared, If you can match a person by their email, why not just SELECT by email only (and return the persons in

Re: [PHP] Re: find (matching) person in other table

2007-05-30 Thread Jared Farrish
On 5/30/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: email has to match "in total". [EMAIL PROTECTED] and [EMAIL PROTECTED] are NOT the same in my case. thanks jared, If you can match a person by their email, why not just SELECT by email only (and return the persons information)? Consider, as

Re: [PHP] Re: find (matching) person in other table

2007-05-30 Thread Afan Pasalic
Jared Farrish wrote: On 5/30/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: yes. in one hand it's more for mysql list. though, I was thinking more if somebody had already something similar as a "project". more as path I have to follow. e.g., in your example, in where clause AND doesn't work bec

Re: [PHP] Re: find (matching) person in other table

2007-05-30 Thread Jared Farrish
On 5/30/07, Afan Pasalic <[EMAIL PROTECTED]> wrote: yes. in one hand it's more for mysql list. though, I was thinking more if somebody had already something similar as a "project". more as path I have to follow. e.g., in your example, in where clause AND doesn't work because bob could be robert

Re: [PHP] Re: find (matching) person in other table

2007-05-30 Thread Afan Pasalic
Jared Farrish wrote: I was thinking to assign points (percentage) to matching fields (last name, first name, email, phone, city, zip, phone) and then list people with more than 50%. e.g., if first and last name match - 75%, if only email match - 85%, if first name, last name and email match - 100