dphs48626 2017-12-24 09:10
浏览 35
已采纳

如何在指定的时间戳后获取所有时间戳?

I am making a chat program and I want to find all timestamps that are greater than a timestamp in a mysql query. I currently have this query

SELECT Message, SendTime, Sender FROM ChatMessages WHERE ((Recipient=$me AND Sender=$talkTo) OR (Sender=$me AND Recipient=$talkTo)) AND 

I am making it check for new chat messages and I want my query only to return new ones. I have a timestamp of when I last checked for messages.

  • 写回答

1条回答 默认 最新

  • dougou3871 2017-12-24 09:15
    关注

    You can put this:

    SendTime > yourTime
    

    at the end of your AND condition to produce the desired result.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?