I am currently creating a project in which a user will be allowed only to download certain columns in a mysql table.
The first part of my question is how do i make it so I can download certain columns into the form of an CSV.
The second part is how do I allow only users to download the columns that they have permission for.
For example I am person A and i want to download the data from this table. I am only allowed to download columns 1, 4 , and 7. This data will come to me in the form of a CSV that I can view and modify in excel.
I dont want the users to be able to view the data they dont have access to.