我在数据库中有2个表
reffQuestion
ID QUESTION
1 Your pet
2 Your fav food
3 Your hobbies
4 Your fav color
reffAnswer
IDS ANSWER
1 Cat
2 Pizza
3 Sport
4 Blue
如果我写row["1"];
,则可以显示ANSWER
我写道:
$SQL = "SELECT A.ID from reffQuestion A
INNER JOIN reffAnswer B on B.IDS = A.ID"
$res = mysql_query($SQL);
while ($row = mysql_fetch_assoc($res)){
$i++;
$answer[$i] = $row['answer'];
}