Jump to content

Compare records


jaikar

Recommended Posts

HI friends

 

this is something about the MySql,

 

is it possible to write a query to compare records in 2 tables, like if the number of records in the  2 tables are equal the query should return 1 if not equal the query should return 0. this can also be done in php like, get the number of records from one table and get number of records in another table, compare it and do the operation. but i wanted to know if its possible to do the compare records using the query itself. for example, if one table has 5 records, this should be compared with another table, if this table has 5 records, then the result of the query should be 1 else 0. if i use joints, it will return all the 5 records. so not sure how to make this in a query. anyone have any idea ?

 

Thanks in advance.

Jaikar

Link to comment
https://forums.phpfreaks.com/topic/54582-compare-records/
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.