Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/04/2011, 10:35
Avatar de omar_gutierrez
omar_gutierrez
 
Fecha de Ingreso: febrero-2011
Mensajes: 144
Antigüedad: 13 años, 2 meses
Puntos: 2
Pregunta Paginacion php mysql

Hola foro, sabia que este dia llegaria, necesito mostrar en pantalla una consulta, pero que tenga paginacion, aunque no siempre, les explico:

Este sistema que he estado diseñando es para capturar pedimentos de importaciones temporales, para hacer las busquedas de los mismos se hace de la siguente manera:

El usuario puede buscar por numero de pedimento (este es unico), descripcion de partida (aqui se necesita la paginacion), fechas de entrada (paginacion), clave de proveedor (paginacion), entre otros.

Cuando mencione que no siempre se requiere la paginacion es devido a que si el usuario busca por numero de pedimento, solo aparecera un pedimento, el numero es unico, aqui no requiero de paginacion; pero si el usuario busca por descripcion de partida (que viene siendo el nombre del material adquirido, ejemplo: "CATALIZADOR DE ESTAÑO", necesito que busque y pagine unicamente los que coinsidan con lo que se busca, ejemplo:

Se capturan 380 pedimentos, 15 de ellos se utilizaron para importar "TOLUENO DIISOCIANATO", El usuario hace la busqueda del pedimento respecto a este material, y la consulta arroja solo los 15 pedimentos.

He buscado en la web, pero la verdad no encuentro un manual que pueda comprender, ademas, no se si tendria que hacer modificaciones en el archivo php donde se realiza la consulta. Aqui les dejo el html donde se inserta el tipo de busqueda:

Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>BUSCAR PEDIMENTO</title>
<style type="text/css">
.titulo {font-family: Arial Narrow; font-size:46px
}
</style>
<style type="text/css">
.TITULOTABLA {font-family: Arial Narrow; font-size:16px
}
</style>
</head>

<body bgcolor="#CCCCCC">
<hr size="5" color="#848484"/>
<table width="880">
  <tr>
    <td width="39"><a href="catalogo_agentes_apoderados.html"><img src="IMAGENES/case.png" alt="CASE" width="35" height="35" title="Catalogo Agentes y/o Apoderados" /></a></td>
    <td width="38"><a href="catalogo_mandatario.html"><img src="IMAGENES/people-icon.png" alt="MANDATARIO" width="34" height="34" title="Catalogo Mandatario / Persona Autorizada" /></a></td>
    <td width="57" height="57"><div align="center"><a href="pedimentos_proveedores.html" target="_self"><img src="IMAGENES/proveedor.png" alt="123" width="53" height="31" title="Catalogo Proveedores" /></a></div></td>
    <td width="40"><div align="center"><a href="pedimento_clientes.html" target="_self"><img src="IMAGENES/employer_icon.png" alt="werg" width="36" height="32" title="Catalogo Clientes" /></a></div></td>
    <td width="41"><div align="center"><a href="pedimentos_captura.html" target="_self"><img src="IMAGENES/capturar.png" alt="Capturar Pedimento" title="Capturar Pedimento" width="37" height="39" /></a></div></td>
    <td width="32"><div align="center"><a href="pedimentos_busqueda.html" target="_self"><img src="IMAGENES/buscar.jpg" alt="654" width="28" height="37" title="Buscar Pedimento" /></a></div></td>
    <td width="42"><a href="regulaciones_restricciones.html" target="_self"><img src="IMAGENES/ruler_pencil.png" alt="7825" width="38" height="38" title="Regulaciones, restricciones no arancelarias y nom" /></a></td>
    <td width="47"><a href="anexos/APENDICES del Anexo 22 de las Reglas de Carácter General en Materia de Comercio Exterior para 2010.htm" target="_new"><img src="IMAGENES/book_icon.png" alt="wqe" width="43" height="43" title="Apendices del anexo 22" /></a></td>
    <td width="39"><a href="anexos/ANEXO 22 de las Reglas de Carácter General en Materia de Comercio Exterior para 2010.htm" target="_new"><img src="IMAGENES/script.png" alt="54" width="35" height="35" title="Reglas del anexo 22" /></a></td>
    <td width="461"><div align="right"><span class="titulo">SISTEMA PEDIMENTOS </span></div></td>
  </tr>
</table>
<hr size="5" color="#848484" />
<p>&nbsp;</p>
<form id="form1" name="form1" method="post" action="search_pedimento.php">
<div align="center">
  <table width="481" border="1" cellspacing="1" cellpadding="1">
    <tr>
      <td width="473" class="TITULOTABLA" scope="col"><p>BUSCAR POR:
        <label for="select"></label>
        <label for="select"></label>
        <select name="SELECCIONAR" id="SELECCIONAR">
          <option selected="selected">NUMERO DE PEDIMENTO</option>
          <option>DESCRIPION DE PARTIDA</option>
          <option>CLAVE PROVEEDOR</option>
        </select>
        <label for="textfield4"></label>
        <input name="BUSCAR" type="text" id="textfield4" size="21" maxlength="21" />
      </p>
        <p align="center">
          <input type="submit" name="submit" id="button" value="BUSCAR" />
        </p></td>
    </tr>
  </table>
</div>
</form>
</body>
</html> 
El php lo pongo en un comentario