title: Finding mysql error occured location
body: <p>I am getting this mysql error</p>
  
  <blockquote>
    <p>"You have an error in your SQL syntax;
    check the manual that corresponds to
    your MySQL server version for the
    right syntax to use near 'AND (
    XYZField = 5)' at line 1 "</p>
  </blockquote>
  
  <p>This error doesnt give information about mysql error occured location , i mean filename, function and line number.Is there any way to retrieve this info?</p>