Ver Mensaje Individual
  #3 (permalink)  
Antiguo 01/02/2002, 06:01
Avatar de PeiShar
PeiShar
 
Fecha de Ingreso: abril-2001
Ubicación: España
Mensajes: 125
Antigüedad: 23 años
Puntos: 0
Re: Paginar resultado de consulta sql con php

En mi caso como lo haría? :( <pre> &lt;table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; align=&quot;center&quot;&gt;
&lt;tr&gt;
&lt;td height=&quot;198&quot; align=&quot;center&quot; valign=&quot;top&quot;&gt;

&lt;table width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;2&quot; align=&quot;center&quot;&gt;
&lt;tr align=&quot;center&quot; valign=&quot;middle&quot; class=&quot;tabla_sup&quot;&gt;
&lt;td width=&quot;20%&quot; height=&quot;30&quot;&gt;Denominaci&amp;oacute;n/Entidad&lt;/td&gt;
&lt;td width=&quot;29%&quot; height=&quot;30&quot;&gt;Calle&lt;/td&gt;
&lt;td width=&quot;7%&quot; height=&quot;30&quot;&gt;C.P.&lt;/td&gt;
&lt;td width=&quot;22%&quot; height=&quot;30&quot;&gt;Localidad&lt;/td&gt;
&lt;td width=&quot;12%&quot; height=&quot;30&quot;&gt;
&lt;div align=&quot;center&quot;&gt;Tel&amp;eacute;fono&lt ;br&gt;
Fax&lt;br&gt;
E-mail &lt;/div&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;?php
include(&quot;php_iaj/cij/conex.php&quot;);
$link=Conectarse();
$result=mysql_query(&quot;SELECT * FROM cij WHERE provincia='$provincia' ORDER BY localidad&quot;,$link);

WHILE ($row=MYSQL_FETCH_ROW($result))
$number = mysql_numrows($result);
if (!$number) print(&quot;&lt;font face='verdana' size='1'&gt;En breve ...&lt;/font&gt;&quot;);

$i = 0;

WHILE ($i &lt; $number):
$nombre = mysql_result($result,$i,&quot;nombre&quot;);
$entidad = mysql_result($result,$i,&quot;entidad&quot;);
$localidad = mysql_result($result,$i,&quot;localidad&quot;);
$direccion = mysql_result($result,$i,&quot;direccion&quot;);
$cp = mysql_result($result,$i,&quot;cp&quot;);
$tfno1 = mysql_result($result,$i,&quot;tfno1&quot;);
$fax = mysql_result($result,$i,&quot;fax&quot;);
$email = mysql_result($result,$i,&quot;email&quot;);
if ($i%2 == 0) {
PRINT &quot;&lt;tr class='tabla_1'&gt;
&lt;td&gt;&lt;font class='text_negro8'&gt; $nombre , $entidad&lt;/font&gt;&lt;/td&gt;
&lt;td&gt;&lt;font class='text_negro8'&gt; $direccion&lt;/font&gt;&lt;/td&gt;
&lt;td&gt;&lt;font class='text_negro8'&gt; $cp&lt;/font&gt;&lt;/td&gt;

sigue... </pre>