Bir sayfa başka çalışır atar: olmayan bir nesne üzerinde bir üye işlev fetch_assoc () Çağrı

0 Cevap php

I've been through all the answers for this error, but something weird happens in my case. I have:

$result = $mysqli->query("SELECT * FROM table");
while ($row = $result->fetch_assoc())
{
    // data echoed here
}

Bu 3 farklı davranışlar vardır:

1.On one page this works perfectly 2.On another page it throws the: Call to a member function fetch_assoc() on a non-object 3.On an empty test page I've just set, where no other code is (except include to $mysqli = new mysqli('host', 'user', 'pass', 'db'); it works, but throws this at me:

Uyarı: nesne olmayan mülkiyet elde etmek için çalışmak

0 Cevap