I am trying to load notifications for users from a mysql table.
so all the notifications will be saved in a notification table with the unique SQL ID, the sql ID of the user and the notification.
Only the notification with his ID will be showed to the used.
But I also want to let admins do global notifications and I don't want to create for example 1000+ rows just to show one notification to everyone, so I want to have a WHERE clause in the mysql query like
SELECT x FROM y WHERE userID = $id OR global = 1
but what if there are global notifications and user notifications too?
How do I show both? Because in the above statement will probably pick the user notifications and ignore the global notifications.