FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Best PHP way to connect to a DB across multiple pages ?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Best PHP way to connect to a DB across multiple pages ? [message #169483 is a reply to message #169480] Wed, 15 September 2010 01:44 Go to previous messageGo to previous message
Beauregard T. Shagnas is currently offline  Beauregard T. Shagnas
Messages: 154
Registered: September 2010
Karma:
Senior Member
The Natural Philosopher wrote:

> goldtech wrote:
>> So I'm make a connection twice, once per each page that uses data
>> from the DB. Always done it this way. Question: Is this a correct
>> way to do this?
>
> More or less yes.
>
> I dont think the overhead of setting up the connection is really
> significant.

...and don't forget to close the connection immediately after you are
done with it.

mysql_close($dbc);

--
-bts
-Four wheels carry the body; two wheels move the soul
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Reference # in var_dump output?
Next Topic: OOP, classes and databases
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 19:27:28 GMT 2024

Total time taken to generate the page: 0.04669 seconds