I have two tables.
Customer :
id | custname | phone
---------------------
1 | abc | 123
2 | xyz | 456
3 | qwe | 786
4 | asd | 1234
Register :
id | regname | status |Desc
-----------------------------------
1 | abc | 1 | text here
2 | cvw | 0 | text here
3 | fgr | 1 | text here
4 | asd | 0 | text here
cust matches in regname : abc and asd
Then I want out put matches custnname for customer and register table details.
id | custname | status |Desc
-----------------------------------
1 | abc | 1 | text here
2 | asd | 0 | text here
How to do it with PHP MySQL query?