thanks bastien for your help
now i have another question...is there a way i can put that in a loop so that it adds how many 1's there are...
also what is wrong with this code, actually i know what is wrong but i don't know how to fix it
$c = 1;
for ($c;$c<28;$c++) {
for ($j=1;$j<=4;$j++) {
$sql= "select count(*) from survey where question.$c=$j";
$result = mysql_query ($sql2);
$result_row = mysql_fetch_row($result);
$field = $result_row[0];
print "$field<br>";
}
}
There are 27 columns with the numbers 1,2,3 or 4 in them and I want to list how many occurrences of each number are in each column.
Can anyone help?
Thanks