mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row()/mysql_num_rows etc… expects parameter 1 to be resource

后端 未结 30 2779
鱼传尺愫
鱼传尺愫 2020-11-21 06:25

I am trying to select data from a MySQL table, but I get one of the following error messages:

mysql_fetch_array() expects parameter 1 to be resource,

30条回答
  •  闹比i
    闹比i (楼主)
    2020-11-21 07:01

    Include a connection string variable before the MySQL query. For example, $connt in this code:

    $results = mysql_query($connt, "SELECT * FROM users");
    

提交回复
热议问题