I have a situation where I need to add dynamic data into my database.
I have a table of Users. UserID, UserName etc.
I have a table of Tasks. TaskID, TaskName. (This table will get tasks added (new row & active set to 1) and removed (active set to 0 so not deleted) over time.
Each month I want to insert a row for each user and I want to insert a Boolean into a database to see if each Task was completed.
Easy but when a Task is entered how to add another column to a database
My idea at the moment is to have this very small (columns)and very long (rows) set up
TaskCompleted
ID
TaskID
UserID
DateAdded (mm/yy)
TaskCompleted (true/False)
Then I would group all results by user & month and loop through each task?
I would end up with millions of rows quickly however.