Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/02/2011, 12:17
cosobo
(Desactivado)
 
Fecha de Ingreso: enero-2011
Mensajes: 66
Antigüedad: 13 años, 3 meses
Puntos: 2
Pregunta Obtener de la bd

Holas,
tengo en la bd una tabla que contiene unos registros OoOoOoO..XD
bueno la cuestión es que una de la columnas es REL y los registros van unidos por el REL algo así:

Cita:
id | rel | nombre | img | ...
1 | 3 | nombre | http://img_1.gif| ..........
2 | 3 | nombre | http://img_2.gif| ..........
3 | 3 | nombre | http://img_3.gif| ..........
4 | 2 | nombre | http://img_4.gif| ..........
5 | 2 | nombre | http://img_5.gif| ..........
6 | 2 | nombre | http://img_6.gif| ..........
esa es la tabla.
-----------------------
ahora en php
quiero mostrar asi:

Código HTML:
Ver original
  1. <ul>
  2.  <!-- ESTE ES UN GRUPO DE IMÁGENES CON EL REL = 3 -->
  3.      <li onclick="window.location='3';">
  4.         <img src="http://img_1.gif">
  5.         <img src="http://img_2.gif">
  6.         <img src="http://img_3.gif">
  7.     </li>
  8.  <!-- ESTE OTRO GRUPO DE IMÁGENES CON EL REL = 2 -->
  9.     <li onclick="window.location='2';">
  10.         <img src="http://img_4.gif">
  11.         <img src="http://img_5.gif.gif">
  12.         <img src="http://img_6">
  13.     </li>
  14.  
  15.  <!-- Y ASÍ SUCESIVAMENTE CON LOS DEMÁS REL -->
  16. </ul>