prepare("SELECT $field FROM categorie, prodotti WHERE prodotti.id_cat=categorie.id AND prodotti.id=$_GET[P]"); $sth->execute(); $prod = $sth->fetch(PDO::FETCH_ASSOC); $sth = $dbh->prepare("SELECT $fieldSub FROM sottocategorie WHERE id=$prod[idSotto]"); $sth->execute(); $sotto = $sth->fetch(PDO::FETCH_ASSOC); ?> - Scheda Prodotto -
prepare("SELECT id, img FROM imgprod WHERE id_prod='$prod[idProd]' ORDER BY id ASC LIMIT 1"); $sth->execute(); $foto = $sth->fetch(PDO::FETCH_ASSOC); if(isset($foto['img']) && $foto['img'] != "") { $imgPath = "am/prodotti/img/".$prod['idProd']."/thumb_".$foto['img']; $imgPathBig = "am/prodotti/img/".$prod['idProd']."/".$foto['img']; } else { $imgPath = "images/img_not_found.jpg"; $imgPathBig = "images/img_not_found.jpg"; } ?>