As I could show all the contents of two tables by a single query you will see the code I have is the following
<?php
$query=$conexion->query("SELECT * FROM
comentarios c
RIGHT JOIN
notificaciones_evaluaciones n
ON n.id_post=c.post_id
WHERE n.para='$id'
ORDER BY GREATEST(n.id_post,c.post_id)");
I need it to show comment notifications and I like it together such as fb stackoverflow notifications etc.
There really has to be no match between the post_id because in fact I want to show all the contents of the two tables therefore this is not because it would bring me all of one table and the matches of the other what would I need to bring everything from the two tables regardless of the type of field or numbers therefore UNION
OR UNIONALL
would not result in this case because the fields vary a little and the number of fields is not equal.
try with FULL OUTER JOIN
but I get the following error
error:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FULL OUTER JOIN notificaciones_evaluaciones n ' at line 3
someone who can give me a hand with what I need to do thanks !!