Non va, sembra proprio che non riesca a leggere nel MySql


<?
//error_reporting(4);
$blocco=20;
$primo=1;
$ultimo=20;
$tstart=time();

$db = mysql_connect("xx.1xx.1xx.3x","Sxxxxxx0","xxxxxxx" );
mysql_select_db("Sxxxxx_x",$db);

$first=1;

$q="SELECT DISTINCT A.alb_inv, A.alb_id, A.alb_loca1, A.alb_nome, A.alb_stelle, A.alb_fot1, A.alb_fot2, A.alb_fot3, A.alb_fot4, A.alb_desctar1, A.alb_pdf, A.alb_caratt,A.alb_showtar, B.localita_pagina, B.localita_arg, B.localita_nome FROM alberghi AS A, localita AS B WHERE A.alb_loca1=B.localita_id AND A.alb_id=".$albergo;
$qlocal="SELECT DISTINCT A.alb_inv, A.alb_id, A.alb_nome, A.alb_stelle, A.alb_desctar1, B.localita_nome FROM alberghi AS A, localita AS B WHERE A.alb_loca1=B.localita_id AND B.localita_id=".$loca;
$q2="SELECT desctariff_descr, desctariff_cols, desctariff_d1, desctariff_d2, desctariff_d3, desctariff_d4, desctariff_d5 FROM desctariffe WHERE desctariff_id=";
$q3="SELECT tariffe_id, tariffe_p1, tariffe_p2, tariffe_p3, tariffe_p4, tariffe_p5, tariffe_cat FROM tariffe WHERE tariffe_alb_id=";
$q4="SELECT periodi_dal, periodi_al, periodi_tariffe_id FROM periodi WHERE periodi_tariffe_id=";
$q5="SELECT descr_testo FROM descrizioni WHERE descr_alb_id=";
$q6="SELECT extra_testo FROM extra WHERE extra_online=1 AND extra_alb_id=";
$q7="SELECT terme_desc FROM descterme WHERE terme_online=1 AND terme_alb_id=";
$q8="SELECT caratt_alt FROM caratterist WHERE caratt_id=";
$q9="SELECT note_testo FROM note WHERE note_alb_id=";
$q10="SELECT supplrid_descr, supplrid_p1, supplrid_p2, supplrid_p3, supplrid_sr, supplrid_p4, supplrid_p5 FROM supplrid WHERE supplrid_alb_id=";

$answ=mysql_query($q,$db);

$albergo = $_GET["albergo"];
//echo ($q);

$albrcd=mysql_fetch_array($answ);
if($albrcd)
{
// if($albrcd[alb_inv]>0)
// echo("<IMG SRC=img/graph/topinverno.gif>
");
// else
// echo("<IMG SRC=img/graph/topestate.gif>
");
printf("<SPAN CLASS=arial16black> %s </SPAN>",$albrcd["alb_nome"]);
printf("<IMG SRC=img/graph/%sst.gif>",$albrcd["alb_stelle"]);
printf("<SPAN CLASS=small><FONT COLOR=silver>(%s)</FONT></SPAN>",$albrcd["alb_id"]);
printf ("<SPAN CLASS=arial11blumaiuscoletto>%s</span>
",$albrcd["localita_nome"]);
if ($albrcd["alb_pdf"]!=NULL)
{ printf ("<A HREF=\"/katalogpdf/%s\" target=\"_blank\"><IMG HSPACE=2 SRC=img/ic_pdf_hotel.jpg BORDER=0></A>",$albrcd["alb_pdf"]);
}

}
mysql_free_result($answ);
?>