calculate percentage of fields with data
Posted: Sun May 03, 2009 8:31 pm
Hi there,
I have said before that I am not really used to asking for help as I like to figure things out for myself but again here I am with another problem that has me
I am trying to figure out how to calculate all the fields in a certain mysql table that has data from the overall fields.
so User Table has say 20 fields and the user with the id of 1 only has 10 of them with data in, I need to write a function that can easily count all fields and then count only the fields with data and display this as a percentage.
Can this even be done? I have tried to the best of my knowledge but come up empty
If anyone can show me the way I would be 3 days worth of grateful to you
Ross
I have said before that I am not really used to asking for help as I like to figure things out for myself but again here I am with another problem that has me
I am trying to figure out how to calculate all the fields in a certain mysql table that has data from the overall fields.
so User Table has say 20 fields and the user with the id of 1 only has 10 of them with data in, I need to write a function that can easily count all fields and then count only the fields with data and display this as a percentage.
Can this even be done? I have tried to the best of my knowledge but come up empty
If anyone can show me the way I would be 3 days worth of grateful to you
Ross