I know there's something wrong here. Can anyone point it out? I am trying to display question_body from questions and answers_body from answers.
EDIT : I got this error: Column 'question_id' in field list is ambiguous
<?php
$auctionSurvey = "SELECT question_id, survey_id, question_body, answer_body FROM questions
INNER JOIN answers ON answers.question_id = questions.question_id
WHERE survey_id='1'";
$aucResult = mysql_query($auctionSurvey) or die (mysql_error());
while($auctionRow = mysql_fetch_assoc($aucResult)){
echo $auctionRow['question_body']. $auctionRow['answer_body'];
}
?>