Ver Mensaje Individual
  #10 (permalink)  
Antiguo 20/11/2007, 13:36
Avatar de Tilens
Tilens
 
Fecha de Ingreso: febrero-2007
Ubicación: España
Mensajes: 41
Antigüedad: 17 años, 2 meses
Puntos: 0
Re: Ayuda en consulta

asi lo haria yo:
Código PHP:
            $consaux2 = mysql_query("
            SELECT a.id_descarga,b.id_categoria,b.descripcion,b.archivo,c.categoria,c.descripcion 
            FROM ot_us a,ot b,ot_categorias c 
            WHERE a.id_usuario = $id_usuario
            AND b.id = a.id_descarga
            AND c.id = b.id_categoria") or die(mysql_error());
            while($rowaux2 = mysql_fetch_row($consaux2)){
                $id_descarga = $rowaux2[0];
                $id_categoria = $rowaux2[1];
                $id_categoria_ant[$i] = $rowaux2[1];
                $descarchivo = $rowaux2[2];
                $archivo = $rowaux2[3];
                $categoria = $rowaux2[4];
                $desccategoria = $rowaux2[5];
                
        ?>
        <div style="padding-left:30px;">
        <? if($xcat!=$categoria) {$xcat=$categoria?><b>+ <? echo "$categoria<br>";?></b><? }?>
        <a href="ot/<? echo $archivo;?>" class="descargas02"><? echo $archivo;?></a> - <? echo $descarchivo;?><br /><br />
        </div>
        </div>