NYCPHP Meetup

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

Mauricio Sadicoff mlevy at hypersol.com
Thu Aug 21 18:01:03 EDT 2003


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

> Then I'm confused.  Why is it then that mysql_select_db() will bomb after the
> user attempted to enter erroneous data into mysql_query()?  That is, the user
> enters bad data within mysql_query(); it throws mysql_error() and delivers the
> page to the user; the user attempts AGAIN to enter somethng and then
> mysql_select_db dies!  Why does that occur?

Difficult to say without knowing the page code, but I would var_dump the
variables (particularly the queries) prior to running them. Make sure to
test the connection state as well. I have a feeling you might be closing it
and not reopening. Maybe the call that opens the connection does not show up
in the second time you run the page...?

Best regards,
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/9d5c7926/attachment.html>


More information about the talk mailing list