title: How to trigger the "error" callback in JQuery AJAX call using in PHP
body: <p>I have PHP code snippet the following:</p>
  
  <pre><code>if (!($result = mysql_query($query, $link))) {
     die("Invalid SQL query: " . $query);
  }
  </code></pre>
  
  <p>And I have JQuery code snippet the following:</p>
  
  <pre><code>$.ajax({
          url: "....search.php", 
          data: ...,
  
          async: false, //to trigger error alert
  
          success: function(xml) {
              ...
          },
  
          error: function(xml) {
              foundError = true;
          },
  
          dataType: "xml"
      });
  
  if(foundError) {
          setProgress("Could not complete the search because an error was found", ProgressBar.ERROR);
  }
  </code></pre>
  
  <p>Is it possible to have the die call trigger JQuery error function callback? If not, how would I trigger it otherwise?</p>