Take out several pieces of data from a table that satisfy the status value = 2, and then use the IDs of the pieces of data to check other tables.
How to use thinkphp
Not very good at joining table queries
select * from re_deposit where deposit_status = 2
select * from re_client INNER JOIN re_deposit on re_deposit.client_code = re_client.client_code
*Note that if two tables have the same fields, the field will only be taken from one of the tables, so it is recommended to add a prefix to the word
//tp3 is probably written like this