Advertisement
MizunoBrasil

Pesquisa em duas tabelas ao mesmo tempo

Feb 17th, 2023 (edited)
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.38 KB | None | 0 0
  1. //faz a pesquisa em duas tabelas ao mesmo tempo  (tabela links e tabela categorias)
  2. // Query para buscar os links no banco de dados
  3. $sql = "SELECT links.id_link, links.nome_link, links.url_link, categorias.nome_categoria FROM links INNER JOIN categorias ON links.id_categoria = categorias.id_categoria"; //FAZ O SELECT EM DUAS TABELAS, NESTE CASO NAS TABELAS LINKS E NA TABELA CATEGORIAS)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement