Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/10/2004, 15:56
piro150380
 
Fecha de Ingreso: octubre-2004
Mensajes: 20
Antigüedad: 19 años, 5 meses
Puntos: 0
Pregunta Consulta SQL LIMITS

Hola amigos saben he hecho una consulta SQL LIMITS me muestra correctamente los 10 primeros registros pero cuando quiero ir a los siguientes registros no me sale porque? Ayudenme aqui esta el codigo

<?php
include("conexion.php");
mysql_select_db("dbordenes",$link);
$rs=mysql_query("select * from cliente") or die("Error SQL");
$total=mysql_num_rows($rs);
$cantidad=10;
if($pagina=="")$pagina=1;
{
$inicio=($pagina-1)*$cantidad;
$rs=mysql_query("select * from cliente limit $inicio, $cantidad")
or die("Error Paginacion");
}
?>
<table align="center">
<tr>
<th>Codigo</th>
<th>Nombre</th>
<th>Empresa</th>
</tr>
<?php while($row=mysql_fetch_array($rs))
{ ?>
<tr>
<td><?php echo $row[0]?></td>
<td><?php echo $row[1]?></td>
<td><?php echo $row[2]?></td>
</tr>
<?php } ?>
</table>
<div align="center"><br>
<?php for($i=1; $i<=($total/$cantidad)+1;$i++)
{ ?>
<a href=""><?php echo $i?>

</a>
<?php
}
?>
</div>