Jump to content

Match Results.


RON_ron

Recommended Posts

How to check if a result of a database match with a result of another database. How do  this?

 

E.g.

In DatabaseA holds a column called usernames.

In DatabaseB holds a column called banned.

 

Is it possible to match results of an Array with an Arrary of results of another database and COUNT the matching results?

 

E.g.

In DatabaseA holds 4 columns and the records are pulled in as an array.

Science

Geography

Accounting

Agriculture

 

In DatabaseB holds 4 columns and the records are pulled in as an array.

Geography

French

Accounting

Science

 

THE RESULT should echo = 1

Link to comment
https://forums.phpfreaks.com/topic/219716-match-results/
Share on other sites

Although, unless you have a reason to pull these all into arrays, you should just do it in your query (I'm guessing at your field names). It will be much more efficient, especially as the tables grow:

 

SELECT * FROM banned, usernames WHERE banned.user_id = username.user_id

Link to comment
https://forums.phpfreaks.com/topic/219716-match-results/#findComment-1139038
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.