$result = mysql_query($query,$link);if( $result === false ) { $error = mysql_error(); echo "Hubo un error grave: " . $error;}