Page 1 of 1

Error message needed!!

Posted: Mon Jan 19, 2004 4:36 am
by Perfidus
I've got an enormeous query (3 tables simultaneously), and when echoing results this query is working fine but, depending on what the HELL is in database, sometimes everything between the {} of the while sentence doesn't appear.
How can I generate an error message that gaves me some light about which data is causing me trouble?

Code: Select all

$result = mysql_query("SELECT * FROM DatosInmueble, Precios, Disponibilidad, Extras WHERE (DatosInmueble.Ref='$Ref' AND Precios.Ref='$Ref' AND Disponibilidad.Ref='$Ref' AND Extras.Ref='$Ref')", $link); 
echo mysql_errno().": ".mysql_error()."<BR>";//This gives me 0:
while($row = mysql_fetch_array($result)){