NYCPHP Meetup

NYPHP.org

[nycphp-talk] Executing script variable.

Analysis & Solutions danielc at analysisandsolutions.com
Wed May 14 12:33:46 EDT 2003


Hi Mark:

On Tue, May 13, 2003 at 11:36:53PM -0400, Mark Armendariz wrote:
>  
> I run my own DB class, which has it's own error handler for MYSQL
> errors.
... snip ...
> SO, whenever I get my DB error, I never actually know which script the
> error is coming from.

As David mentioned, __FILE__ and __LINE__ are handy.  In my SQL class, the 
first two parameters to each method is $File and $Line.  So, when my 
scripts call one of the methods, I use __FILE__ and __LINE__.  Therefore, 
my class knows where in my scripts I called the method from, so I can go 
to the appropriate location and fix the problem.

Enjoy,

--Dan

-- 
     FREE scripts that make web and database programming easier
           http://www.analysisandsolutions.com/software/
 T H E   A N A L Y S I S   A N D   S O L U T I O N S   C O M P A N Y
 4015 7th Ave #4AJ, Brooklyn NY    v: 718-854-0335   f: 718-854-0409



More information about the talk mailing list