I am doing a matching script for my site, have problem on the results and sending out part.
------
I have a "users" column on my tablea and "users2" column on my tableb. I need to find out who matches tablea "Users" country criteria from tableb "users2" country criteria.
------
$match="select * from tablea, tableb where tablea.country=tableb.country";
$matchresults = mysql_query($match) ;
while($matched = mysql_fetch_array($matchresults) ){
$results = $matched[users2] matches $matched[users]
//than send to those $matched[users] who have results..
//for example :$matched[users] has results of $matched[users2], $matched[users2], $matched[users2], $matched[users2]
Send this 4 results to $matched[users] in only one email with the 4 results.
}
Hope my explaination is clear, any helps will be really appreciated!
------
I have a "users" column on my tablea and "users2" column on my tableb. I need to find out who matches tablea "Users" country criteria from tableb "users2" country criteria.
------
$match="select * from tablea, tableb where tablea.country=tableb.country";
$matchresults = mysql_query($match) ;
while($matched = mysql_fetch_array($matchresults) ){
$results = $matched[users2] matches $matched[users]
//than send to those $matched[users] who have results..
//for example :$matched[users] has results of $matched[users2], $matched[users2], $matched[users2], $matched[users2]
Send this 4 results to $matched[users] in only one email with the 4 results.
}
Hope my explaination is clear, any helps will be really appreciated!