Ver Mensaje Individual
  #7 (permalink)  
Antiguo 25/10/2009, 12:59
Avatar de luckystrikede11
luckystrikede11
 
Fecha de Ingreso: octubre-2009
Ubicación: Concepcion, Chile
Mensajes: 240
Antigüedad: 14 años, 6 meses
Puntos: 17
Respuesta: listar imagenes y campos de una tabla

el reporte podria ser algo asi:

Código PHP:

$sql 
mysql_query("SELECT a.id,a.nombre,a.precio,a.existencia,b.id_prod,b.imagen FROM productos a,imagenes b WHERE a.id=b.id_pro");

echo 
"<table>";
while(
$row mysql_fetch_array($sql)){
      echo 
"<tr>";
      echo 
"<td>".$row['imagen']."</td>";
      echo 
"<td>".$row['nombre']."</td>";
      echo 
"<td>".$row['precio']."</td>";
       echo 
"</tr>";
}
echo 
"</table>"