NYCPHP Meetup

NYPHP.org

[nycphp-talk] if mysql_query() produces an error....

Mauricio Sadicoff mlevy at hypersol.com
Thu Aug 21 17:13:15 EDT 2003


On 8/21/2003 17:04, "Phil Powell" <soazine at erols.com> scribbled:

> ...is it not true that mysql_error() will persist?  I have a case on a site
> where the admin enters a new user and, for some reason, does it wrong,
> producing a mysql_error() instance.  If they try to, again, enter this user
> immediately after the error is shown, mysql_select_db dies.
>  
> I am thinking that this can be resolved by clearing mysql_error() immediately
> after the error is reported.  How can that be done, or am I way offbase here?

It does not "persist", meaning it will only show the latest error, according
to the manual, on page:

http://us2.php.net/manual/en/function.mysql-error.php

They also mention that it will not be changed if the user does not have
permission to do what you intend or if the connection has been closed
already.

Good luck,
Mauricio

--- 
 Mauricio L. Sadicoff
 mlevy at hypersol.com


"Peace of mind isn't at all superficial, really," I expound. "It's the whole
thing. That which produces it is good maintenance; that which disturbs it is
poor maintenance. What we call workability of the machine is just an
objectification of this peace of mind. The ultimate test is always your own
serenity." - Zen and the Art of Motorcycle Maintenance.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030821/354f6671/attachment.html>


More information about the talk mailing list