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

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

On 8/21/2003 17:27, "Phil Powell" <soazine at> 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 L. Sadicoff
 mlevy at

"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: <>

More information about the talk mailing list