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 #169478 is a reply to message #169477] Tue, 14 September 2010 23:48 Go to previous messageGo to previous message
Hamish Campbell is currently offline  Hamish Campbell
Messages: 15
Registered: September 2010
Karma:
Junior Member
On Sep 15, 10:28 am, goldtech <goldt...@worldpost.com> 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?

Yes, it is correct.

You can create persistent database connections if you really need to
(see <http://php.net/manual/en/features.persistent-connections.php>),
but unless you have a specific requirement it is best to stick to non-
persistent connections.

Regards

Hamish
[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: Sun Oct 20 19:37:30 GMT 2024

Total time taken to generate the page: 0.04393 seconds