Error Resource Id #9
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and resource id #8 error policies of this site About Us Learn more about Stack Overflow the company resource id #4 error in php Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users minecraft resource id Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a resource id #3 minute: Sign up Error in query, what is Resource id #9? up vote 0 down vote favorite I have following code.. $query = "SELECT quote, author FROM quotes ORDER BY id DESC"; $resut = mysql_query($query, $connection) or die(mysql_error()); echo $result; //for debuggin purpose while($result_set = mysql_fetch_array($result)) { echo '
Resource Id #5
and this doesn't works! The table is not empty FYI, all I see in the output is: Resource id #9 I am not being able to figure out what this Resource id #9 means. As I tested SELECT quote, author FROM quotes ORDER BY id DESC in phpmyadmin, that just works fine and produces desired result, but not in here. I wonder what is wrong with the code or something? If I do following, $array = mysql_fetch_assoc($result); var_dump ($array); It returns, bool(false). What does that mean here? php share|improve this question asked May 21 '12 at 1:36 sushil 1091625 Where is $connection defined? Also, note the spelling difference between $result and $resut. –Sampson May 21 '12 at 1:40 stackoverflow.com/questions/5523840/… might help. –Ryan May 21 '12 at 1:40 solved.. typo, there is RESUT instead or resu[L]t. –sushil May 21 '12 at 1:43 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote accepted What is a "Resource"? There's nothing wrong with Resource id #9 (this just means you have a resource). Note the d
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about
Resource Id #2
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges resource id #6 Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. mysql resource id Join them; it only takes a minute: Sign up resource id # 53 error in mysql [duplicate] up vote -2 down vote favorite Possible Duplicate: How do i “echo” a “Resource id #6” from a MySql response in PHP? http://stackoverflow.com/questions/10678657/error-in-query-what-is-resource-id-9 Hey guys, I got an error when I try to run my code in PHP. It displays resource id #53 in my screen. All I want is to count only the total of one of my field but I'm stuck with this error. Here's my code below: $last_points = mysql_insert_id(); //echo $last_points , display like 12... no error $fkid = $last_points; // no error.... $sql = "SELECT COUNT(*) FROM downline WHERE fkmember = {$fkid}"; $execute = mysql_query($sql) or http://stackoverflow.com/questions/12615069/resource-id-53-error-in-mysql die (mysql_error()); echo $execute; //display error why? Help me guys please. I think it's my query. php mysql database codeigniter share|improve this question edited Mar 15 '13 at 2:48 Daniel Li 10.6k43053 asked Sep 27 '12 at 6:08 rochellecanale 914 marked as duplicate by MvG, Luke Woodward, Xaerxess, mah, Ash Burlaczenko Nov 7 '12 at 16:48 This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. Did my answer help you? –Daniel Li Oct 3 '12 at 18:58 add a comment| 4 Answers 4 active oldest votes up vote 2 down vote First off, resource id #53 is not an error. You are displaying a resource, not the output of the query. To show the output, use: $last_points = mysql_insert_id(); //echo $last_points , display like 12... no error $fkid = $last_points; // no error.... $sql = "SELECT COUNT(*) FROM downline WHERE fkmember = {$fkid}"; $execute = mysql_query($sql) or die (mysql_error()); print_r(mysql_fetch_array($execute)); //display error why? Secondly, the mysql_* functions are deprecated. You should look into learning and utilising the mysqli or PDO libraries accordingly. share|improve this answer answered Sep 27 '12 at 6:09 Daniel Li 10.6k43053 i got Array ( [0] => 0 [COUNT(*)] => 0 ) means no data right? –rochellecanale Sep 27 '12 at 6:28 It means there were
sure to check out the FAQ by clicking the link above. You http://www.webdeveloper.com/forum/showthread.php?84826-Resource-id-9 may have to register before you can post: click the http://www.comunidaddephp.org/debugueando/363/ayuda-resource-id-%239 register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 3 of 3 Thread: Resource id #9 Tweet Thread Tools Show Printable Version Email this resource id Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 11-09-2005,09:55 AM #1 R.Noon View Profile View Forum Posts Registered User Join Date Sep 2005 Posts 75 Resource id #9 Alright, when I try putting in a valid user, it doesn't pop up the error resource id user name, but instead pops up "Resource id #9". Are you sure you want to delete user Resource id #9? -- is the line it gives me. This isn't the ninth user in the table, I don't even have nine users. Thanks in advance everyone. PHP Code: tus dudas y dificultades que tengas para seguir avanzando en tus proyectos de PHP Todas las categorías Frameworks (26) Base de Datos (81) CMS (12) General (322) Front-End (5) [Ayuda] Resource id #9 0 votos Hola a todos, vengo a pedirles ayuda para resolver un problema, les explico rapido. Tengo una tabla llamada boletin_enfermedades, la cual contiene un campo llamado fecha_publicacion, lo que quiero hacer es que en mi index, me aparecesca la ultima fecha de publicacion que se registro en la tabla. Asi tengo el codigo pero en el index me aparece : Resource id #9 Espero me puedan ayudar a resolver este error Gracias y Saludos a todos php resource id #9 preguntado por only (920 puntos) Dic 10, 2013 en General Por favor ingresa o regístrate para responder a esta pregunta. 1 Respuesta 0 votos El código tal cual lo tienes funciona perfecto, la cosa es que mysqlquery devuelve un resource el cual normalmente lo lees usando funciones como mysqlfetch_assoc, o en este caso, funciona mysql_result. $actualizacion = mysql_query(...); echo mysql_result($actualizacion, 0, 'fecha_publicacion'); Ahora bien, trata de usar PDO o MySQLi en lugar de las funciones mysql_* que están próximas a ser deprecadas :) respondido por oso96_2000 (1,500 puntos) Dic 10, 2013 Gracias por la ayuda bro, con esto quedo solucionado mi problema Saludos comentado por only (920 puntos) Dic 11, 2013 Por favor ingresa o regístrate para añadir un comentario. Comentarios ... include('header.php');
if($username!=NULL)
{
if(!isset($_POST['submit']))
{?>
Username:
}
else{
$sqlDel="select*from`user`where`name`='".$_POST['username']."'";
$results=mysql_query(