I have PHP code snippet the following:
if (!($result = mysql_query($query, $link))) {
die("Invalid SQL query: " . $query);
}
And I have JQuery code snippet the following:
$.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);
}
Is it possible to have the die call trigger JQuery error function callback? If not, how would I trigger it otherwise?