search data in Mysql and php table

Asked

Viewed 52 times

1

I have table A with id and user fields and table B with id, data and id_A; On the PHP page I want q to appear the contents of table B, and with id_A to find the name in table A. The main thing for me would be to search a table in another, because the content I can already send to the page.

1 answer

0

You have to list the tables in select, try so:

SELECT b.id, b.dados FROM tablela a, tabelab b WHERE a.id = b.id 

Browser other questions tagged

You are not signed in. Login or sign up in order to post.