Project Detail

field relationship function  

field relationship function is project number 301834
posted at Freelancer.com. Click here to post your own project.

 

| More Free Trial For New Buyers
 

Status:

Selected Providers: SoftEngineer

Budget: $30-250

Created: 08/17/2008 at 18:03 EDT

Bid Count: 2

Average Bid:
$ 30

08/19/2008 at 18:03 EDT

Project Creator: FlakDevelopment
Employer Rating: 10/1010/1010/1010/1010/1010/1010/1010/1010/1010/10 (20 reviews)

Bid On This Project
 

Description

Hi,

I have a mysql table as follows:

+--------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+-------------+------+-----+---------+-------+
| email | varchar(50) | YES | | NULL | |
| source | varchar(50) | YES | | NULL | |
+--------+-------------+------+-----+---------+-------+


I need a function which takes an two email addresses as parameters, and returns the "distance" between them.

Not sure but i think backtracking might solve this.

I'm paying $30 for the PHP function. I need it within 1-2 hours after I award the project.

Please dont waste my time!


Additional information submitted:

08/17/2008 at 18:17 EDT:
Each "source" email address is an user of ours, who is using a contact importer to import their contacts. All imported contacts go in the "email" column.

Now, each of these imported emails may also import other contacts, and so on.

We need the function to be able to tell how many contacts away a source email is from another particular email, so we can display something like:

You are connected to ABC@domain.com through:
A@domain1.com > B@domain2.com > ..... > N@domainN.com

I can't explain any better than this. If it's still not clear, please withdraw bid.

08/17/2008 at 18:46 EDT:
Update: i just tried backtracking and it breaks the database. We need this to work without hanging mysql when dealing with 100 000 + contacts.

08/17/2008 at 19:40 EDT:
Here is some recursive code that just displays if a match was found. Again, this breaks the database if we try with around 100,000 contacts in the table.

It needs to display the PATH to a contact or NO MATCH.



function find($start,$end) {

$res=mysql_query("select * from contacts where source='".$start."'");

while ($row=mysql_fetch_array($res))
if ($row['email']==$end) {
print "found!rn";
exit;
}else
{
print "Trying ".$row['email']."rn";
find($row['email'],$end);
}
}


Messages Posted:0 View project clarification board Post message on project clarification board

Bid On This Project
 

If you are the project creator or one of the bidders Log In for more options

 

30

0 days

08-17-2008 19:34 EDT

Hi, please check PM. Thanks

help

 

30

0 days

08-17-2008 19:26 EDT

Please check your pm

help


    Bid on this Project