Re: mysql_error() not really helping
| From: | David Robley | Date: | Wed, 14 Feb 2001 01:29:33 +0000 |
| Subject: | Re: mysql_error() not really helping | ||
| References: | 1 | Groups: | php.general php.general |
| Request: | Send a blank email to php-general+get-39573@lists.php.net to get a copy of this message | ||
On Wed, 14 Feb 2001 13:01, Christian Dechery wrote:
> I'm having a little trouble here developing and running queries.
>
> I spent some time developing in ASP, and whenever there was something
> wrong with a query, the script halted, and the error message - from
> ODBC, tye sql syntax error - was printed along with the line of code.
>
> In PHP that's not how it goes, it doesn't tell me when theres an error
> with a mysql_query unless I place a call to mysql_error() after each
> executed query right?
>
> That's exactly what I'm doing, but again, it doesn't do all I want, cuz
> it doesn't tell me the line of code, and I don't know where is the
> error, unless I start printing everything on error handling.
There is a PHP constant __LINE__ which you may find useful.
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA