Skip to main content
5 events
when toggle format what by license comment
Aug 20, 2019 at 14:15 comment added user3019105 You just need to update the user's table of what the oldest unread datetime stamp is -> Could you please clarify this sentence? What do you mean? Update the user's last pull by the brower timestamp to the timestamp of the newest unread notification? Then why you used the word oldest?
Jul 13, 2014 at 0:46 comment added Reactgular @Mik378 that's more of a database issue then technique. I would use NOW() as in a SQL expression and use transactions to ensure things are executed in the correct order. In MySQL you can perform a SELECT and UPDATE as one transaction. I forget the syntax, but there are ways to ensure this is done safely.
Jul 12, 2014 at 23:03 comment added Mik378 Nice answer. But what if a notification is stored while the datetime stamp about the pull is about to be inserted (traversing the network). Would I lose it? Imagine the update to be: XXh:XXm:XXs:12ms and the notification arrives at XXh:XXm:XXs:11ms.. leading to a lost unread item in the future pull.
Jul 12, 2014 at 23:00 vote accept Mik378
Jul 12, 2014 at 22:39 history answered Reactgular CC BY-SA 3.0