This is a translated page. The original can be found here: http://iwebdevel.com/2009/06/23/php-error-call-to-a-member-function-fetch_assoc-on-a-non-object-in/
UPDATES VIA RSS | Email ACTUALIZACIONES VIA RSS | Email Get updates via feedburner Get updates via twitter
Home / Coding / PHP / PHP Error: Call to a member … Inicio / codificación / PHP / PHP Error: Llamada a un miembro ...

PHP Error: Call to a member function fetch_assoc() on a non-object in PHP Error: Llamada a una función miembro fetch_assoc () en un objeto no en

Posted on 23. Publicado en 23. Jun, 2009 by Dragos in Coding , PHP Junio de 2009, por Dragos en la codificación, PHP

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. Si recibe este error: Llamada a un miembro de la función fetch_assoc () en un objeto no en ..., significa que usted tiene un error en la sintaxis de MySQL. Supposing that $mysqli is your database connection object, put echo $mysqli->error; just before the line you're getting the error on. Suponiendo que $ mysqli es su objeto de conexión de bases de datos, poner echo $ mysqli-> error; justo antes de la línea que usted está recibiendo el error.

 $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'); mQuery $ = $ mysqli-> query ( "SELECT` datos `de` `this_table donde` id `= 1 '); 
 echo $mysqli->error; //echoes that column `data` does not exist in table `this_table` echo $ mysqli-> error; / / se hace eco de que los datos de la columna `no existe en la tabla` this_table » 
 $row=$mQuery->fetch_assoc(); //gives error as the column `data` is in table `that_table`, not in table `this_table` $ row = $ mQuery-> fetch_assoc (); / / da error en la columna de «datos», se encuentra en la tabla `that_table», no en la tabla `this_table» 
 $mysqli->close(); $ mysqli-> Close (); 
Translate this post Traducir este mensaje


Related posts: Puestos relacionados con:

  1. Wordpress: Easily Reset Your Account Password Using MySQL and PHP Wordpress: Fácilmente Restablecer la contraseña de la cuenta Uso de MySQL y PHP
  2. Coding:How to fetch user profile data with SSI.php from a SMF forum database Codificación: Cómo buscar datos de perfiles de usuario con SSI.php de una base de datos de foro SMF
  3. JavaScript: How to get the index (position within a group) of an object with jQuery? JavaScript: Cómo obtener el índice (posición dentro de un grupo) de un objeto con jQuery?
  4. JavaScript: Send function as a parameter to another function (callbacks) JavaScript: Enviar funcionar como un parámetro a otra función (callbacks)
  5. Ubuntu terminal: invalid host type && configure: error: can only configure for one host and one target at a time Terminal de Ubuntu: tipo de host no válido & & configure: error: sólo puede configurar para un anfitrión y un objetivo a la vez

  • Jenny Jenny
    Pretty nice post. Post Muy bonito. I just found your site and wanted to say Acabo de encontrar su sitio y quería decir
    that I've really enjoyed reading your blog posts. que he disfrutado mucho leyendo su blog. Anyway De todos modos
    I'll be subscribing to your blog and I hope you write again soon! Estaré suscriban a tu blog y espero que escribir de nuevo pronto!
blog comments powered by Disqus blog alimentado por Disqus