Error message needed!!

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Perfidus
Forum Contributor
Posts: 114
Joined: Sun Nov 02, 2003 9:54 pm

Error message needed!!

Post 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)){
Post Reply