[nycphp-talk] Anyone know why the "select" query will die?
shiflett at php.net
Thu Aug 21 16:37:31 EDT 2003
--- Phil Powell <soazine at erols.com> wrote:
> On occasions the "select" query will die for no apparent reason.
> The "insert statement" is nullified and not done either. However,
> upon the user hitting the back browser button and resubmitting both
> work fine and then continue to work fine for an indeterminate amount
> of time.
Maybe you should output mysql_error() on failure. That will be far more
informative than any guess I can make. You could have too many connections or
any number of other errors that could cause sporadic behavior.
> Perhaps I'm missing something here: what I'm trying to do is insert
> a new record and immediately obtain the id column field value from
> the new record.
You should use the function for tht and save yourself a query:
Hope that helps.
Become a better Web developer with the HTTP Developer's Handbook
More information about the talk