Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Oct 2007
    Posts
    241
    Member #
    15910
    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.

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    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?

  4. #3
    Senior Member
    Join Date
    Oct 2007
    Posts
    241
    Member #
    15910
    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)

  5. #4
    Senior Member
    Join Date
    Oct 2007
    Posts
    241
    Member #
    15910
    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...


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

count non-empty cells in row

,

how to counting unempty row using php

,

mysql count empty cells in a row

,

php mysql count cells

Click on a term to search for related topics.
All times are GMT -6. The time now is 02:57 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com