I’ve got a long double query that is giving me a 1064 error, but I can’t find it, hetre you have the code and also the error message at the end:
[code=php]
<?
$link = mysql_connect(”.”.”);
mysql_select_db(“”,$link);
$result = mysql_query(“SELECT DatosInmueble.Localidad, DatosInmueble.Zona, DatosInmueble.Habitaciones, DatosInmueble.Banyos, DatosInmueble.Superficie, DatosInmueble.Precio, DatosInmueble.Descripcion, DatosInmueble.Gas, DatosInmueble.Aire_Acond, DatosInmueble.Pta_Blindada, DatosInmueble.Ascensor, DatosInmueble.Garaje, DatosInmueble.Trastero, DatosInmueble.Calefaccion, DatosInmueble.Terraza, DatosInmueble.Armarios, DatosInmueble.Balcon, DatosInmueble.Piscina, DatosInmueble.cocinael, DatosInmueble.cocinagas, DatosInmueble.lavavajillas, DatosInmueble.lavadora, DatosInmueble.DatosInmueble.cafetera, DatosInmueble.microhondas, DatosInmueble.horno ,DatosInmueble.zonajuegos, DatosInmueble.basket, DatosInmueble.futbol, DatosInmueble.tenis, DatosInmueble.accesplaya, DatosInmueble.minusvalidos, DatosInmueble.tele, DatosInmueble.parabolica, DatosInmueble.video, DatosInmueble.equipomus, DatosInmueble.cajafuerte, DatosInmueble.tranquilo, DatosInmueble.entornoint, DatosInmueble.zonacomer, DatosInmueble.zonaocionoc, DatosInmueble.calific, DatosInmueble.tren, DatosInmueble.carretera, DatosInmueble.aeropuerto, DatosInmueble.iglesia, DatosInmueble.todoelagno, DatosInmueble.masde1, DatosInmueble.masde2, DatosInmueble.metrosplaya, DatosInmueble.metroscentro, DatosInmueble.alarma, DatosInmueble.toilet, DatosInmueble.Ref, DatosInmueble.Mascota, DatosInmueble.Familias, DatosInmueble.Pensionistas, DatosInmueble.Gentejoven, DatosInmueble.Indiferente, DatosInmueble.Inmo, DatosInmueble.Conjunto, DatosInmueble.Sesion, DatosInmueble.Fianza, DatosInmueble.Apartamentoname, DatosInmueble.limpieza, DatosInmueble.maximo, Precios.ene1, Precios.ene2, Precios.ene3, Precios.ene4, Precios.ene5, Precios.feb1, Precios.feb2, Precios.feb3, Precios.feb4, Precios.feb5, Precios.mar1, Precios.mar2, Precios.mar3, Precios.mar4, Precios.mar5, Precios.abr1, Precios.abr2, Precios.abr3, Precios.abr4, Precios.abr5, Precios.may1, Precios.may2, Precios.may3, Precios.may4, Precios.may5, Precios.jun1, Precios.jun2, Precios.jun3, Precios.jun4, Precios.jun5, Precios.jul1, Precios.jul2, Precios.jul3, Precios.jul4, Precios.jul5, Precios.ago1, Precios.ago2, Precios.ago3, Precios.ago4, Precios.ago5, Precios.sep1, Precios.sep2, Precios.sep3, Precios.sep4, Precios.sep5, Precios.oct1, Precios.oct2, Precios.oct3, Precios.oct4, Precios.oct5, Precios.nov1, Precios.nov2, Precios.nov3, Precios.nov4, Precios.nov5, Precios.dic1, Precios.dic2, Precios.dic3, Precios.dic4, Precios.dic5, FROM DatosInmueble, Precios WHERE (DatosInmueble.Ref=’$Ref’ AND Precios.Ref=’$Ref’)”, $link);
echo mysql_errno().”: “.mysql_error().”<BR>”;
while($row = mysql_fetch_array($result)){
?>
1064: You have an error in your SQL syntax near ‘FROM DatosInmueble, Precios WHERE (DatosInmueble.Ref=’Sit5001’ AND Precios.Ref=” at line 1
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /chs/p1/costa4seasons.com/home/html/fichapiso.html on line 25