I need one help. I need to check one table's column data is present in another table in same database using PHP and MySQL.I am explaining my table below.
db_gallery:
id subcat_id image
1 60 123.png
2 60 234.png
3 58 456.png
db_special_image
id subcat_id name gallery_image
1 60 aaa 123.png
2 58 bbb 456.png
Here I need to check whether any gallery image is present inside the db_special_image table. I need to check with subcat_id. Suppose I know the subcat_id=60. I need to check any image from db_gallery table belongs to subcat_id=60 is present in db_special_image table or not. If any image is there then it will return 1 otherwise 0. I need query for this. Please help me.