easy mysql query question
- by Ahmet vardar
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