Submitted by Cheeks in programming (edited )

I'm building a small intranet for the small business I work for and am having some issues with one of the applications. I'm forced to host on windows, as much as I hate this it is fine as I worked in a predominantly IIS/MS SQL server shop for 7 years.

My stack is windows, IIS, php, mongodb. Was thinking about using expressjs, but whatever...

The problems are mainly with how to setup the db and programmatically insert and display the results within the grid I have set up.. Approach, essentially: Rows are users. Columns are days of the week and a total for the week. CRUD operations aren't a problem -tmestamping is an issue as a few records will be inserted after midnight. -Should I make different tables(I think there called documents in mongodb) for each week? -am I really just overthinking this?

My background was in systems/network administration, I can script backups of several dozen servers without a problem but webdev is somewhat foreign to me.

6

Comments

You must log in or register to comment.

DissidentRage wrote

It sounds like you're totaling data per user per day per week and generating a report for that?

As far as inserting data into your display table, it should only be running a query that sums up the information when you need to display it. No database table necessary for that. You could save it into a report if you really wanted to. That would need a new structure.

1

Cheeks OP wrote

It's basically a daily ledger per user totaling daily till the end of the week. We need to hold onto the data in case of any discrepancies. This will remove otherwise necessary redundancy and eliminate some of the user error.

I want to display all entry's for the week.. With a totals field per user. And have one input for the day. I just don't want the user, sometime myself, to have to pick from a drop down of the different users to input the information and retrieve the totals when we are doing 10 to 12 of these at a time.

I think I will just index a collection by date and timestamp the inputs. When displaying the data I will just have to query the date and timestamp within a range as we input some of this data after midnight.

1