
how do you count non empty cells in a row in mysql? also, i only want to count a certain range of cells. not all. for example, my row is: id, title, date, q1, q2, q3, q4, q5, q6. I would like to count only the range of q1 through q6 and want to find how many of them are non empty.

By range what do you mean?
Do you want to have a row counted if the columns q1, q2, q3, q4, q5 and q6 are not empty?

i want to count the number of non empty q1, q2, q3 cells in one row. this is for the number of questions in a particular poll. i can also enter this value manually when entering q1 q2 q3 etc through my form, because i obviuosly know how many questions i am writing for that poll. but want to make this automatic, in case at some point i make an error, plus it eliminates one extra column, which just stores the number of questions.
(I need the number of questions in order to correctly display the poll later)

so in other words, one poll is one row (just its title and questions). a row looks like this:
id, title, date, q1, q2, q3,q4 q5, q6, q7, q8. and i also need to have one more qtotal column in the end, IF i am not able to count how many q are non empty. but if i can, then i dont need to have a qtotal column...