Reply to Re: Is it better to open connection with DB at beginning and close at end, or after every "object run"?

Your name:

Reply:


Posted by Dikkie Dik on 01/11/06 20:51

3) The database object/connection is created as soon as it is needed and
passed to all units that need it. This allows reuse of the units.

Best regards

Rafi B. wrote:
> Sorry for the English.
> I mean, when building my applications, I often need to do several
> database actions, and I'm thinking, what's better?
>
> 1) Open connection with DB, for instance mySQL, at beginning and close
> at the end, so every "unit" in the code knows that THIS IS the
> connection, and its opened.
>
> OR
>
> 2) Every "unit" in the code opens and closes DB connection
> independantly.
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация