Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/05/2009, 11:05
flashtkd
 
Fecha de Ingreso: agosto-2008
Mensajes: 587
Antigüedad: 15 años, 8 meses
Puntos: 6
Respuesta: Quiero contar las filas, pero da error

es extraño no me muestra ningun valor numerico, de cuantas filas existen, yo se que tengo 7 filas, pero en phpp no me muestra nada.

Código PHP:
<html>
<head>
<title>Mostrar</title>
</head>
<body>

<?php
include("includes/registrar.php");

$registros=mysql_query("SELECT COUNT(nombre)
                        from $tabla"
,$conexion) or
  die(
"Problemas en el select:".mysql_error());  

$reg=mysql_fetch_array($registros);

  echo 
$reg['nombre'];

mysql_close($conexion);
?>

</body>
</html>