PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Hata: Üye için fetch_assoc olmayan () on-nesne fonksiyonu Arama
Posted on 23. 23 olarak gönderildi. Jun, 2009 by Dragos in Coding , PHP Haziran, 2009 Kodlama, PHP ve Dragos tarafından
If you get this error: Call to a member function fetch_assoc() on a non-object in … , it means that you have an error in your mysql syntax. Eğer bu hata: Üye çağır fetch_assoc olmayan () on-nesne ..., bu durum mysql sözdizimi bir hata var demektir fonksiyonu. Supposing that $mysqli is your database connection object, put echo $mysqli->error; just before the line you're getting the error on. O $ mysqli Veritabanı bağlantı nesnesi ise, Supposing $ mysqli-> hata echo koymak; hemen önce hattı size hata alıyorsanız.
$mysqli=new mysqli(HOST,USER,PASS,DB); $ mysqli = new mysqli (host, user, PASS, DB); $mQuery=$mysqli->query('select `data` from `this_table` where `id`=1'); `den $ mQuery = $ mysqli-> query ( 'seçeneğini` veri `this_table` nerede `id` = 1'); echo $mysqli->error; //echoes that column `data` does not exist in table `this_table` > hata $ mysqli-eko / / echoes o sütun `veri` tabloda `this_table` yok $row=$mQuery->fetch_assoc(); //gives error as the column `data` is in table `that_table`, not in table `this_table` $ row = $ mQuery-> fetch_assoc (); / / `tablo içinde` tablo `değil, that_table` this_table `sütunu` veri olarak hata verir $mysqli->close(); $ mysqli-> close ();
Related posts: Ilgili posta:
- Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: kolayca hesap şifrenizi MySQL ve PHP'nin sıfırla
- Coding:How to fetch user profile data with SSI.php from a SMF forum database Kodlama: Nasıl Bir SMF forumunun veritabanından SSI.php ile kullanıcı profili veri almak için
- JavaScript: How to get the index (position within a group) of an object with jQuery? JavaScript: jQuery ile nasıl bir nesnenin (konum bir grup içinde) kütüğü almak için?
- JavaScript: Send function as a parameter to another function (callbacks) JavaScript: başka bir işlev (geriçağırımları) bir parametre olarak işlev gönder
- Ubuntu terminal: invalid host type && configure: error: can only configure for one host and one target at a time Ubuntu terminal: geçersiz konak tipi & & configure: error: bir seferde bir bilgisayar ve bir hedef için sadece yapılandırmak
- Jenny Jenny












































