
18/05/2009, 11:14
|
 | | | Fecha de Ingreso: mayo-2007 Ubicación: por ahí intentado ayudar
Mensajes: 823
Antigüedad: 17 años, 10 meses Puntos: 6 | |
Respuesta: Quiero contar las filas, pero da error Pero si quieres contar usa count();
<?php
include("includes/registrar.php");
$registros=mysql_query("SELECT COUNT(nombre)
from $tabla",$conexion) or
die("Problemas en el select:".mysql_error());
while ($reg=mysql_fetch_array($registros) ){
echo "$reg['nombre']";
}
$registros= count($reg);
echo "Numero de registros" .$registros;
mysql_close($conexion);
?>
__________________ "Eres grande por que caminas entre gigantes" |