Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource

前端 未结 4 551
遇见更好的自我
遇见更好的自我 2021-01-22 12:50

Hell there when i try and connect to pull thing out of the database i get the following error:

Warning: mysql_fetch_object(): supplied argument is not a valid My         


        
4条回答
  •  梦谈多话
    2021-01-22 13:17

    That's because your query is wrong.

    $sql = "GET * FROM matt";
    

    must probably become

    $sql = "SELECT * FROM matt";
    

    the basic measure to get warned about this is

    if (!$result)
     die("mySQL error: ". mysql_error());  
    

    after issuing a query.

提交回复
热议问题