3
Everybody, Good afternoon.
I have the following question. I have a questionnaire with 10 questions, the answers to these questions can be 0 to 5, I would like to make a while out counting the answers.
I thought the following way and concatenate as the loop was repeating.
$inicio = 1;
while($inicio <= 10){
$query = "$query$inicio";
$row = "$row$inicio";
$query = mysql_query("SELECT * FROM carrefour WHERE notapergunta1=1 AND statusPesquisa=2");
$row = mysql_num_rows($query);
$inicio++;
}
did not understand your question can be more specific? what do you want to tell? if you can enter more details maybe can help.
– João Reis
So @Hardcorder, I’m going to try to be as specific as possible. I have a questionnaire in HTML and CSS with 10 questions, when people answer this questionnaire it is registered in a table the answers. I’m developing a chart for this quiz and I’m using Chartsjs to generate these graphs, the question is the following: This quiz can have grades from 0 to 5, so I’d like to create a while where I scroll through my chart to generate this automated graph, and not having to ask a query for each question.
– Bruno Cesar