我正在使用 get 方法从 mysql 数据库中获取值我从 url 传递survey_id 和 question_id
如下 http://myserver.com/emrapp/surveyAnswersScreenOne.php?survey_id=1,question_id=1
但它给出了错误
下面给出了我的 php 代码用于获取
$query = mysql_query("SELECT * from survey_Answers where survey_Id='".$survey_id."' AND question_Id='".$question_id"' ");
$rows = array();
while($row = mysql_fetch_assoc($query)) {
$rows[] = $row;
}
echo json_encode($rows);