query($sql); $sql_pos= "select sotto_categoria.sotto_categoria,prodotti.* from prodotti,sotto_categoria where sotto_categoria.id=prodotti.sottocategoria and prodotti.ID=" . $code; $titolo=""; $result_seo=$connessione->query($sql_pos); if ($result_seo->num_rows>0) { if ($r=$result_seo->fetch_assoc()) { $titolo=strtolower($r['nome']) . ' - ' . strtolower($r['sotto_categoria']); $foto_t="select * from foto_prod where codicearticolo='" . $r["codicearticolo"] . "'"; $res_foto_t=$connessione->query($foto_t); if ($res_foto_t->num_rows>0) { if ($rigaf=$res_foto_t->fetch_assoc()) { $foto=$rigaf["foto"]; }} ?>