Hi guys, the problem I have is the following, I have three tables "post", "copies" "Friends" related to each other. I explain in the table FRIENDS the ids of the friends' sessions are saved among them, in the post table the information of those who publish a post is saved, for example their last name etc ... after that the user publishes a post there is an option or a button that when pressing the function that will do is take a copy of the desired post and save the information in the table Copies basically the same information because in reality is a copy of the post what will be saved, the only thing that will vary will be the date . Well up there all right, now what I really need is to read those two tables through a query that shows me all the contents of the POST table and COPIES in order of date I do not know if I understand, here is an example:
NOTE : this query is successful shows me all the contents of the two tables of the users that are my friends but I want to show it to me in order of date since it is showing me everything disorganized.
SELECT * FROM
amigos a LEFT JOIN
contenido ON contenido.id_user = a.para
LEFT JOIN copias
ON contenido.id = copias.post_id and copias.id_user = a.para
WHERE de='{$_SESSION["id"]}'
tabla "Amigos"
---------|--------|---------|-----------|
id_ami | de |para |fecha |
---------|--------|---------|-----------|
tabla "Post"
---------|--------|---------|-----------|--------|------|
id_post | Nombre |Apellido |Comentario |Imagen |Fecha |
---------|--------|---------|-----------|--------|------|
tabla "Copias"
---------|--------|---------|-----------|-----------|-------|------|
id_cop |id_post |Nombre |Apellido |Comentario |Imagen |fecha |
---------|--------|---------|-----------|-----------|-------|------|
I hope you can help me with how you could order it by date thanks !!