Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I would use idea #1. I wouldn't use a bool-field to check whether the user has read the message, I'd use a datetime-field, with some default value. If field == default, unread. When read, set field NOW().</p> <p>That way you know aproximately how fast your users read the message.</p> <p><strong>EDIT:</strong></p> <p>after your edit, I'd still use the same mechanism. The message needs a field to find out whether or not is read. If the users clicks the X (to close), update the db and mark the message as read.</p> <p>If the admin posts a new message, this will popup.</p> <p>You also need a creation-datetime for your messahe, cause if a user did not close the previous message, and the admin posts a new one, only the latest message can be shown.</p> <p><strong>EDIT2:</strong> In reply to this comment:</p> <blockquote> <p>Even if a user missed am message, only the newest should be shown. Maybe I am misunderstaning but it sounds like you are saying to basicly mark a message read 100,000 times is 100,000 users click the X and I think it should be more on the user table, show or do not show message box, not on an individual basis</p> </blockquote> <p>something is not locigal in your theory. You want to save the "show/don't show" as a setting, but you want to show the message anyway. How do you know when to overrule the usersetting and when not without remembering whether the system showed the message to the user? Even if you want to just show it once, you'll need a field in the database (on message-level) to store whether the system showed the message to the user or not.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload