Tim Traver <mailto:[EMAIL PROTECTED]>
    on Monday, June 07, 2004 11:52 AM said:

> Is it possible to get the line number of the parent script of a
> subroutine ??? 

no, not like you want (afaik). i wanted this same thing too but ended up
just doing a workaround. it's a little kludgy but it's not *too* bad. i
just pass __LINE__ throughout all my db related functions.

(something like this)

$db = new Database;

$sql = "SELECT name FROM people";

$db->query($sql, __LINE__);

and $db->query() is setup so that when/if there is an error it will
print the line number.


hth,
chris.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to