Prepared Statement Help

New to php and having trouble with prepared statements. I have created basics prepared statements to pull data from one table I created with no problem. However, I now need to query two tables. Table A has a list of all my users (id, role, status, date of last entry) Table B( id, name, email, address, 15-20 columns). The query I would like to make is

Select ID FROM Table A WHERE
role = ‘some value’ AND status = ‘some value’

I would like to use the results from that query to select * from Table B where the IDs from the first previous query match.

I hope I have described this correctly. Any help would be greatly appreciated.

Thanks.

Sponsor our Newsletter | Privacy Policy | Terms of Service