Re: problemas con mysql_num_rows

From: Date: Tue, 14 Feb 2006 23:36:59 +0000
Subject: Re: problemas con mysql_num_rows
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-57816@lists.php.net to get a copy of this message
prueba asi : //$resultados1=mysql_query("SELECT idinsc FROM inscesp WHERE visible = 1"); //$total_registros=mysql_num_rows($resultados); $resultados = mysql_query("SELECT * FROM inscesp WHERE visible = 1 ORDER BY fecha DESC LIMIT $inicio, $registros"); //$total_paginas = ceil($total_registros / $registros); while($articulo=mysql_fetch_array($resultados)) { echo "<b>".$articulo["apellido"]."</b><br>"; echo "<font color='#666666'>".$articulo["nombre"]."</font><br><br><br>"; } ----- Original Message ----- From: "Johnny Sanchez" <johnny@inder.co.cu> To: "php" <php-es@lists.php.net> Sent: Tuesday, February 14, 2006 12:59 PM Subject: [PHP-ES] problemas con mysql_num_rows hola nuevamente, ahora estoy enfrascado en el asunto de los reportes, y para comenzar tengo este codigo con este error codigo: //$resultados1=mysql_query("SELECT idinsc FROM inscesp WHERE visible = 1"); //$total_registros=mysql_num_rows($resultados); $resultados = mysql_query("SELECT * FROM inscesp WHERE visible = 1 ORDER BY fecha DESC LIMIT $inicio, $registros"); //$total_paginas = ceil($total_registros / $registros); while($articulo=mysql_fetch_array($resultados)) { echo "<b>".$articulo["apellido"]."</b><br>"; echo "<font color='#666666'>".$articulo["nombre"]."</font><br><br><br>"; } error: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\web\sitio\cong\adm\salidas\3.php on line 37 Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\web\sitio\cong\adm\salidas\3.php on line 40 Si alguien fuera tan amable de decirme que error tengo ahi, le estare agradecido. Johnny -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ---------------------------------------------------------------------------- ---- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.7/259 - Release Date: 13/02/2006 -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.

« previous php.general.es (#57816) next »