可能重複:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result獲取數據
我在PHP MySQL數據庫中獲取數據,但它給錯誤,如下列:
警告:mysql_fetch_assoc():提供的參數不是第97行的/home/content/i/h/u/ihus235/html/cs/emrapp/surveyList.php中的有效MySQL結果資源。 []
下面是我使用的選擇數據的查詢:
$query = mysql_query("SELECT * form survey_Profile where user_Id='".$user_id."' ");
您在您的sql語法中有錯誤。驗證'survey_rofile'表和'user_Id'字段是否存在 –
''echo'mysql_error()'中的$ query'類型' –