Re: Line Number
| From: | Max Derkachev | Date: | Mon, 11 Sep 2000 12:57:42 +0000 |
| Subject: | Re: Line Number | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-16163@lists.php.net to get a copy of this message | ||
try this (simple use of the __LINE__ builtin constant) :
mysql_db_query("something" , "Select * from 'tbl_book") or die("SQL
Error at line " . __LINE__);
PHP Researcher wrote:
> Dear Sir/Madam
>
> I want to know how can i get the number of the line that is parsing.
>
> suppose that i have a die function and i want to print line number for example see below lines:
> //////////////////
> mysql_db_query("something" , "Select * from 'tbl_book") or
> die("SQL Error at line $LineNo);
> //////////////////////
>
> I want to set line number to the LineNo so programmer can imagine which line of code cause an
> error.
>
> Thanks a lot
>
> ------------------------------------------------------------
> Iranian search people ,
> Add yourself -> http://www.rahnema.com/people/register
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Best regards,
Max A. Derkachev mailto:kot@books.ru
Symbol-Plus Publishing Ltd.
phone: +7 (812) 265-0054, 265-1228, phone/fax: 567-8775
http://www.Books.Ru -- All Books of Russia