tati 12 lat temu
rodzic
commit
6c4a7a6efa
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4 2
      Productos.php

+ 4 - 2
Productos.php

@@ -64,7 +64,7 @@ $statement->bind_result($nombre);
                     <label for="img-1" class="prev">&#x2039;</label>
                     <label for="img-1" class="prev">&#x2039;</label>
                 </div>
                 </div>
                 <div id="lista_productos">
                 <div id="lista_productos">
-					<? while ($i<3 && $statement->fetch()) {
+					<? while ($i<3) {
 						$i++;
 						$i++;
 					?>
 					?>
                     <div id="producto" style="float:left;">
                     <div id="producto" style="float:left;">
@@ -77,7 +77,9 @@ $statement->bind_result($nombre);
                              <u>Ver más</u> 
                              <u>Ver más</u> 
                         </div>
                         </div>
                     </div>
                     </div>
-					<? } //while $i %3 && st-fetch
+					<? 
+					if (!$statement->fetch()) { break };
+					} //while $i %3 && st-fetch
 					$i=0;
 					$i=0;
 					?>
 					?>
                 </div>
                 </div>