I have the following inserts in different tables but the value $Ref, works in table Precios and Disponibilidad, but not in DatosInmueble (The first one). All the datas travel correctly to DB but $Ref and code seems to be fine.
What happens?
<?
$sql = "INSERT INTO DatosInmueble ( Tipo, Localidad, Zona, Dirección, Habitaciones, Banyos, Superficie, Precio, Descripcion, Gas, Aire_Acond, Pta_Blindada, Ascensor, Garaje, Trastero, Calefaccion, Terraza, Armarios, Balcon, Piscina, cocinael, cocinagas, lavavajillas, cafetera, microhondas, horno, zonajuegos, basket, futbol, tenis, accesplaya, minusvalidos, tele, parabolica, video, equipomus, cajafuerte, tranquilo, entornoint, zonacomer, zonaocionoc, calific, tren, carretera, aeropuerto, iglesia, todoelagno, masde1, masde2, metrosplaya, metroscentro, alarma, toilet, Ref, Mascota, Familias, Pensionistas, Gentejoven, Indiferente, Inmo, Conjunto, Sesion)" .
"VALUES ('$Tipo', '$Localidad', '$Zona', '$Dirección', '$Habitaciones', '$Banyos', '$Superficie', '$Precio', '$Descripcion', '$Gas', '$Aire_Acond', '$Pta_Blindada', '$Ascensor', '$Garaje', '$Trastero', '$Calefaccion', '$Terraza', '$Armarios', '$Balcon', '$Piscina', '$cocinael', '$cocinagas', '$lavavajillas', '$cafetera', '$microhondas', '$horno', '$zonajuegos', '$basket', '$futbol', '$tenis', '$accesplaya', '$minusvalidos', '$tele', '$parabolica', '$video', '$equipomus', '$cajafuerte', '$tranquilo', '$entornoint', '$zonacomer', '$zonaocionoc', '$calific', '$tren', '$carretera', '$aeropuerto', '$iglesia', '$todoelagno', '$masde1', '$masde2', '$metrosplaya', '$metroscentro', '$alarma', '$Ref', '$toilet', '$Mascota', '$Familias', '$Pensionistas', '$Gentejoven', '$Indiferente', '$Inmo', '$conjunto', '$session')";
$result2 = mysql_query($sql) or die(mysql_error().'<p>'.$sql.'</p>');
$sql = "INSERT INTO Precios ( Ref, ene1, ene2, ene3, ene4, ene5, feb1, feb2, feb3, feb4, feb5, mar1, mar2, mar3, mar4, mar5, abr1, abr2, abr3, abr4, abr5, may1, may2, may3, may4, may5, jun1, jun2, jun3, jun4, jun5, jul1, jul2, jul3, jul4, jul5, ago1, ago2, ago3, ago4, ago5, sep1, sep2, sep3, sep4, sep5, oct1, oct2, oct3, oct4, oct5, nov1, nov2, nov3, nov4, nov5, dic1, dic2, dic3, dic4, dic5)".
"VALUES ('$Ref', '$ene1', '$ene2', '$ene3', '$ene4', '$ene5', '$feb1', '$feb2', '$feb3', '$feb4', '$feb5', '$mar1', '$mar2', '$mar3', '$mar4', '$mar5', '$abr1', '$abr2', '$abr3', '$abr4', '$abr5', '$may1', '$may2', '$may3', '$may4', '$may5', '$jun1', '$jun2', '$jun3', '$jun4', '$jun5', '$jul1', '$jul2', '$jul3', '$jul4', '$jul5', '$ago1', '$ago2', '$ago3', '$ago4', '$ago5', '$sep1', '$sep2', '$sep3', '$sep4', '$sep5', '$oct1', '$oct2', '$oct3', '$oct4', '$oct5', '$nov1', '$nov2', '$nov3', '$nov4', '$nov5', '$dic1', '$dic2', '$dic3', '$dic4', '$dic5')";
$result2 = mysql_query($sql) or die(mysql_error().'<p>'.$sql.'</p>');
$sql = "INSERT INTO Disponibilidad ( Ref, ene1, ene2, ene3, ene4, ene5, feb1, feb2, feb3, feb4, feb5, mar1, mar2, mar3, mar4, mar5, abr1, abr2, abr3, abr4, abr5, may1, may2, may3, may4, may5, jun1, jun2, jun3, jun4, jun5, jul1, jul2, jul3, jul4, jul5, ago1, ago2, ago3, ago4, ago5, sep1, sep2, sep3, sep4, sep5, oct1, oct2, oct3, oct4, oct5, nov1, nov2, nov3, nov4, nov5, dic1, dic2, dic3, dic4, dic5)".
"VALUES ('$Ref', '$ene1d', '$ene2d', '$ene3d', '$ene4d', '$ene5d', '$feb1d', '$feb2d', '$feb3d', '$feb4d', '$feb5d', '$mar1d', '$mar2d', '$mar3d', '$mar4d', '$mar5d', '$abr1d', '$abr2d', '$abr3d', '$abr4', '$abr5d', '$may1d', '$may2d', '$may3d', '$may4d', '$may5d', '$jun1d', '$jun2d', '$jun3d', '$jun4d', '$jun5d', '$jul1d', '$jul2d', '$jul3d', '$jul4d', '$jul5d', '$ago1d', '$ago2d', '$ago3d', '$ago4d', '$ago5d', '$sep1d', '$sep2d', '$sep3d', '$sep4d', '$sep5d', '$oct1d', '$oct2d', '$oct3d', '$oct4d', '$oct5d', '$nov1d', '$nov2d', '$nov3d', '$nov4d', '$nov5d', '$dic1d', '$dic2d', '$dic3d', '$dic4d', '$dic5d')";
$result2 = mysql_query($sql) or die(mysql_error().'<p>'.$sql.'</p>');
echo "<font color='#0000FF' size='1' face='Arial, Helvetica, sans-serif'>¡Gracias! Los datos acerca del piso ".$Ref." han sido introducidos correctamente, ahora puede subir las fotos del mismo <a href='guardafotos.html'>aquí<a></font>" ;
?>