i am trying to make php ajax one to one chat.............my problem is that how can i fetch the chat messages from table by both user1 and user2........ my database table has........
id, from, to, text, time fields..............
what would be the query to show the messages from both users with their respective names....