Greetings!
I am trying to create a print auditing app that will display how much each user is printing on a daily basis.
I am using Novell iPrint for auditing. The audit report is in .csv format.
The trouble I am having is every print job is logged individually. See below.
USER_1,5,54022
USER_1,1,54506
USER_1,24405
USER_1,1,18943
USER_1,1,12947
USER_1,3,12947
USER_1,1,76747
USER_1,1,18943
USER_2,4,456130
USER_3,1,99425
USER_3,1,98308
USER_3,1,170148
USER_3,3,129331
USER_4,1,283553
USER_4,1,430808
The first field represents username, the second field represents page count for that job, the third field represents total bytes for that job.
I want to combine each user into a single row and then sum the page count and byte count for that user.
For example:
USER_1,15,273460
USER_2,4,456130
USER_3,8,1211573
I plan to store this info in a mySQL database and overwrite the page count and byte counts every time the audit is run.
Anyone have any ideas how to do this?
Thanks!