Okay I have a database of people that work in certain cities. I have a second database with other (secondary) cities (near by) that they work in. What I want to do is go into the first database and see if there is no one listed for that city. If so, go into the other database and find those who have that city listed as a secondary city. Then get their ID and go back into the first database and get their info (using ID).
Code:
check for primaries
if($cat_rows == 0)
{
$cat_altresult = DatabaseSelect(MY FUNCTION.. ITS FINE searches for secondary cities get array??);
$cat_rows = sizeof($cat_altresult);
if($cat_rows != 0)
{
$alt_msg = "blah";
}
else
$alt_msg = "blah blah";
}
Take IDs from secondary cities, go into primary table and gather info for EVERYONE who has that city listed as a secondary.
Getting the multiple rows is my problem... i think... someone recommend a join, but I am not sure how to do this on two databases. Thanks
Someone recommend a join, but Im n
2006-07-26
04:52:58
·
3 answers
·
asked by
Duds331
5
in
Computers & Internet
➔ Programming & Design
I meant tables... :\ same DB two tables... my bad
2006-07-26
05:05:34 ·
update #1