![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
13/01/2010, 06:32
|
| | Fecha de Ingreso: febrero-2009
Mensajes: 443
Antigüedad: 16 años Puntos: 1 | |
pero no se como incluir el if hago esto pero me da error $query = "select nombre_categoria,nombre_producto,ruta_foto_grande, ruta_foto_pequena,descripcion_producto from producto,foto,categoria where id_foto=producto_id_foto and id_categoria=producto_id_categoria and id_categoria=$_GET[id_categoria] group by nombre_producto ";
$result = mysql_query($query);
$nombre_categoria=0;
while ($row = mysql_fetch_array($result)){
echo "<div class='producto'>
<div class='titulo'><h1>{{$row "if($nom_categoria==0){['nombre_categoria']}"}</h1></div>
<div class='titulo'><h2>{$row['nombre_producto']}</h2></div>
<div class='imagen'>
<a href=' {$row['ruta_foto_grande']}' /><img src=' {$row['ruta_foto_pequena']} '/></a>
<div class='ampliar'><p><a href=' {$row['ruta_foto_pequeña']}' />ampliar</a></p></div></div>
<div class='descripcion'><p>{$row['descripcion_producto']}</p></div><br><br><hr></div> ";
$nombre_categoria++;
}
?> |