Hello,
I am trying to writing a code i.e if query dies then admin will got an email with the following information. I have shown the following information in an error email
Complete URL :
Date and Time:
Logged In User name:
User Type:
Query that dies:
Everything is going well.
Now i want to display the LINE NUMBER of the code where error occurs.
I am unable to do this. Kindly help me in this regard. It takes my lot of time
Regards,
Eshban
How to display line number where error occurs
Moderator: General Moderators
Re: How to display line number where error occurs
The magic constant __LINE__ is the line number it is on.
query_error takes a query and a line number and sends the email.
Code: Select all
<?php
// blah
// blah
// blah
mysql_query($query) or die(query_error($query, __LINE__));