I have an include file which handles my sql queries. In this file I have an error function which prints the error messages from mysql in a nice format and mail it to me.
I want to return the filename WHERE the QUERY was defined.
So in f.e. project.php I include a file ('lib_project.php') and in that include file I make a query: "Select * from project where x=1". If x is not a column field it prints an error. In that error I want the filename 'lib_project.php' to be shown.
Anybody an idea?