Tema: ayuda php
Ver Mensaje Individual
  #6 (permalink)  
Antiguo 10/07/2010, 14:28
llamaradaweb
 
Fecha de Ingreso: noviembre-2005
Mensajes: 29
Antigüedad: 18 años, 6 meses
Puntos: 0
Respuesta: ayuda php

puede haber un error aca? porque saltea alguna carga, por ejemplo:
1 2
4 5
7 8

me salteo el 3 y el 6


-------------------------
<?php
$regx = 2;
$regy = 5;
$registros = $regx * $regy;

/////****PAGINADOR*****/////////

if(isset($_GET['p'])) {
$pagina = $_GET['p'];
$inicio = ($pagina - 1) * $registros;
} else {
$inicio = 0;
$pagina = 1;
}

$paginaActual="Hoja_2.php?";

$queryTotalRegistros="SELECT COUNT(*) FROM catalogo WHERE dato_4 = 'Hoja_2' AND estado = 1 ORDER BY 1 asc";

$resultados = mysql_query($queryTotalRegistros);
$row = mysql_fetch_array($resultados);
$total_registros = $row[0];


$queryRegistros= "SELECT * FROM catalogo WHERE dato_4 = 'Hoja_2' AND estado = 1 ORDER BY 1 asc LIMIT $inicio, $registros";

$resultados = mysql_query($queryRegistros);

$total_paginas = ceil($total_registros / $registros);

////////*****FIN********///////////

if($total_registros > 0)
{


echo "<table border='1' cellpadding='1' cellspacing='40' style='height: 80%; width: 80%;' class='style4'>";
$x = 0;
$y = 0;
echo "<tr>";
while($row = mysql_fetch_array($resultados)) {
if($y < $regy) {
if($x < $regx) {
echo "<td>";
echo "<a href='#' onclick=\"javascript:window.open('detallefoto.php? id=".$row["IDCatalogo"]."','','toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=520, height=435, top=10, left=10');\">";
echo "<img src='".$pathImagenesNotas."/".$row["imagen"]."' alt='$PieImagen' width='50' height='50' style='border: 4px solid; border-color:#003366;'/>";
echo "<br>";
echo "<br>";
echo "<strong>";
echo "DATO 1: ".$row["dato_1"]."<br/>";
echo "</strong>";
echo "</a>";
echo "DATO 2: ".$row["dato_2"]."<br/>";
echo "DATO 3: ".$row["dato_3"]."<br/>";
echo "</td>";
$x++;
}else{
$y++;
echo "</tr>";
echo "<tr>";
$x = 0;
}
}else{
break;
}
}
echo "</tr>";
echo "</table>";
} else {
?>