New Project

    Date: 06/30/07 (MySQL Communtiy)    Keywords: database, web

    Recently, I thought up a new project that will be used for storing Recipes. This way I'd have access to my recipe box from anywhere, and all my recipes would be stored in one place, rather than at a bunch of different sites.

    At this point I'm mostly just writing down the details of what I want it to do, but it occured to me that there are going to be a TON of database calls in this thing. Like, oodles. At least until I figure things out a bit better.

    This brought up a question that has been lurking in the back of my mind for a while...Is it better to open a connection to a database, make your query/insert/whatever, and then close it again? Or is it better to open the connection at the initial pageload and then close it at the end of everything?

    Since this is going to be web based, if I did just the single open/close, how would I guarantee that the connection is closed out properly?

    Usually when I do something with databases, it's not intended to be used by a huge lot of people (this project included), but every function that makes queries/inserts/etc from the database also has it's own open/close statements to the database. I'm just wondering if that's the best way to do it on what might become a large scale project (because, frankly, this thing may turn into a beast really quickly).

    Source: http://community.livejournal.com/mysql/115872.html

« Dealing with bad CVS data... || Just a quickie »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home