What I want to do is count all my filled rows of specific row name I select, let me give you an example:
Its like I have a table with 6 columns; the very first column is email - and the rest column are slot1, slot2, slot3, slot4, slot5.
Now what I want to have is a function that - when I select a specific email address - it returns how many slots are filled under that email address - just like when we use this command:
$t = select * from tabnlename where email=something
mysql_fetch_array($t)
echo $t['slot1'] . $t['slot1'] and on and on ...
I want a function that counts how many slots are filled where email = mychoiceemail
.
Let me give you some more details take a look at my sql table
supemail slot1 slot2 slot3 slot4 slot5
opera@gmail.com somedata somedata somedata somedata somedata
kaku@gmail.com somedata somedata somedata
nashu@gmail.com somedata
now what i want is when i select opera@gmail.com the function should return 5 as it has all 5 columns filled ! when i select kaku@gmail.com it should return 3 as it has 3 slots filled and when i select nashu@gmail.com it should return 1 only as it has only 1 slot filled !