NYCPHP Meetup

NYPHP.org

[nycphp-talk] Anyone know why the "select" query will die?

Phil Powell soazine at erols.com
Thu Aug 21 16:39:33 EDT 2003


How do you people know so many PHP commands out there? DO you know every
single one of them? WOW, thanx!! That was a brand new one for me, saves me a
db query connection!

Phil

----- Original Message ----- 
From: "Chris Shiflett" <shiflett at php.net>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Thursday, August 21, 2003 4:37 PM
Subject: Re: [nycphp-talk] Anyone know why the "select" query will die?


> --- 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:
>
> http://www.php.net/mysql_insert_id
>
> Hope that helps.
>
> Chris
>
> =====
> Become a better Web developer with the HTTP Developer's Handbook
> http://httphandbook.org/
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk




More information about the talk mailing list