Currently I am trying to have a database abstraction class report the line # that called the class, and report it's number in my abstration layer...
Here are the two classes:
- db.php
- query.php (where query extends db).
Currently
db has a method called PrintError() this function is triggered in the query class. I need the PrintError() function to report the line number of the calling object. Example:
This code is called in test.php
$objdb = new db('sharky', 'cf', 'cf',1);
$objdb->set_db('db_foundations');
$qryAccts = new query($objdb, 'SELECT MAKE ERROR * FROM tbl_accts');
I need my db PrintError() method to return the line where $qryAccts is set. (Because obviously the sql is wrong.
Any ideas?