easy mysql query question
        Posted  
        
            by Ahmet vardar
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Ahmet vardar
        
        
        
        Published on 2010-04-21T17:17:33Z
        Indexed on 
            2010/04/21
            17:23 UTC
        
        
        Read the original article
        Hit count: 231
        
Hi,
here is the "msg" table on mysql
sent_to  customer   msg      read
-------  --------  ------   -----
45          3       bla       0
34          4        bla       1
34          6        bla       0
45          3        bla       0
56          7        bla       1
45          8        bla       0
for example user whose id number is 45 logs in,
i want him to see this,
you have 2 unread msg to your "number 3" customer
you have 1 unread msg to your "number 8" customer
like a news feed
what query should i use for this ?
thx
© Stack Overflow or respective owner