field relationship function is project number 301834
posted at Freelancer.com. Click here to post your own project.
Bid Count: 2
Average Bid:
$ 30
08/19/2008 at 18:03 EDT
Project Creator:
FlakDevelopment
Employer Rating: ![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
(20 reviews)
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);
}
}
|
Job Type |
|