PHP Mysql Inbox feature in messaging system : <p>Hello I am saving messages in my mysql database. The columns are </p>

<pre><code>id 

sender_id 

receiver_id 

dateTime
</code></pre>

<p>I want to build an inbox functionality. I don't understand how can I build this feature. I mean sender can be receiver and receiver can be sender. So for example If user id wants to see his messages in the inbox, how can I query it. I mean lets say there are two records with  <code>sender_id</code> is 10 and <code>receiver_id</code> is 11 and three records with <code>sender_id</code> is 11 and <code>receiver_id</code> is 10. So now I want is to get single row between two persons conversations so that I can show them in the inbox. Its very difficult to explain but I hope you have understood this</p>
