Jump to content

Cross Matching Results


adamjblakey

Recommended Posts

Hi,

 

I have a bit of a tricky one which i cannot work out how to do.

 

Basically i have done the following query:

 

$new = new database;
$new->selects("SELECT * FROM regions WHERE country = 'Africa'");
$results = $new->getRes();
$smarty->assign('results', $results);

 

Which will find all the different regions in Africa.

 

Then this has been printed out by:

 

{foreach from=$results item=result name=results}
           {$result.country} - (How Many Listings in this country)
           {/foreach}

 

Then what i want to do is run another query with the 'users' table to check if any of the regions printed out match.

 

Does anyone know how to do this at all?

 

Cheers,

Adam

Link to comment
https://forums.phpfreaks.com/topic/88580-cross-matching-results/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.