how to catch mysql error in php code example Example: how to catch mysql error in php errorMessage(); } ?>