0
And I’m having the following problem, there are two POSTS and TOPIC tables, one topic has several posts, and I’m displaying the topics by sorting the most current date of the topic post, only when creating a new topic it doesn’t display on the screen because it has no post, and if I post on the topic it displays on the screen because it has post, and I wanted to know how I can display the topics that have no posts? How can I list the topics that have no posts? Because my JOINN is only bringing the topics that have related posts
$sqlTopicos = mysqli_query($conexao,
"SELECT topico.titulo, posts.idTopico, slug, posts.dataPost, usuario.usuario, visualizacoes, qtdPosts
FROM (SELECT * FROM posts ORDER BY dataPost DESC) posts
INNER JOIN topico
ON posts.idTopico = topico.idTopico
INNER JOIN usuario
ON topico.idUsuario = usuario.idUsuario
WHERE posts.idArea = '$idArea' GROUP BY titulo ORDER BY posts.dataPost DESC");
I got it this way:
– viniciussvl
Did not appear its solution, put again.
– rodrigorf