Hi everyone
I'm currently working on a survey project,now my problem is that my while loop isn't giving the correct results. i have a mysql table that looks like this.
sectionID SurveyID sectionTitle sectionInstructions
1 2 section1 answer the following questions
2 2 section2 answer the following questions
Ive already queried the questions of the survey from the database to display on a pdf file, now what i want is that for each section of questions the section title should appear.
my current query is
[$query1]=["SELECT * FROM section where SurveyID =".$_GET['survey'];]
[ $result1]=[ mysql_query( $query1,$link );]
[while ( $a_row1 = mysql_fetch_row( $result1 ) )]
{
[$pdf->ezText($a_row1[2]."\n",10,array('justification'=>'left'));]
[echo "$a_row1[2]";]
}
and displays all the section titles before the questions which is not what i want.
Your help will be appreciated!!!!!