When I am grabbing data from my table that require permissions, should all the permission be done there? Such as checking for an admin or if they can view the data (in MySQL)?
Or should I grab it if they have a record at all, then check the specific actions (such as view, add, edit, delete) on the PHP side?
It’s usually more efficient to do everything in SQL but it’s also more complicated, and can be a lot harder to maintain.
Mostly it depends on your exact security model and security concerns.