prepare("SELECT $field FROM categorie WHERE id='".$_GET['C']."'"); $sth->execute(); $cat = $sth->fetch(PDO::FETCH_ASSOC); } if(isset($_GET['S']) && $_GET['S'] != "") { $_GET['S'] = (int)$_GET['S']; $app_query .= " AND id_sotto='".$_GET['S']."'"; $sth = $dbh->prepare("SELECT $field FROM sottocategorie WHERE id='".$_GET['S']."'"); $sth->execute(); $sot = $sth->fetch(PDO::FETCH_ASSOC); } ?> <? if($cat['nome'] != "") echo $cat['nome']." » "; ?> <? if($sot['nome'] != "") echo $sot['nome']." - ";?> Elenco Prodotti -

Elenco Prodotti

query("SELECT $field FROM prodotti $app_query")as $prod) { $sth = $dbh->prepare("SELECT img FROM imgprod WHERE id_prod='$prod[id]' ORDER BY id DESC LIMIT 1"); $sth->execute(); $foto = $sth->fetch(PDO::FETCH_ASSOC); if(isset($foto['img']) && $foto['img'] != "") { $imgPath = "am/prodotti/img/".$prod['id']."/thumb_".$foto['img']; } else { $imgPath = "images/img_not_found.jpg"; } ?>