[thelist] PHP/MySQL odd problem

Mr. Tenuta dtportnoy at videotron.ca
Fri Jul 9 22:00:27 CDT 2004

> > I think I read somewhere that you need to close the SELECT query before
> > doing another one. Don't ask where.
> >
> > Before doing //Query 2 add
> >
> > mysql_close();
> >
> > Let us know,
> >
> > Rob

Ha thanks Rob! it worked! mysql_close($link); include("config.php");

I close the connection and reconnected to the db and it works... but just
curious, Isn't it a little inefficient to have to reconnect to the db each
query instead of just opening at beginning of page and closing at end of
page. It just doesn't sound right.

Also, on another server in the same location I was workign with it fine just
connecting once and doing quite a few SELECTS, UPDATE's etc... What could
differ between these two servers that makes me have to reconnect for every
query? They both basicaly have the same setup and if my eyes don't deceive
me, the output from phpinfo() is also identical.

Thanks for the help everyone!!,
Lawrence Tenuta @ neoDesignz

More information about the thelist mailing list