RTrev
03-12-2007, 12:02 PM
I've got a little PHP/MySQL learning project where I'm simply storing links to sites, for display. One page shows the categories to choose from, and when the user makes a choice we jump to the next page which does a query on the category and displays all matching links.
People will be going back and forth between the two pages, which makes me want to open the database and table once and leave it open. The alternative is repeated opening/closing.. which must introduce quite a bit of overhead.
The problem is if the user simply leaves either page, which they presumably will at some point, the database will never be closed via an actual close statement.
What happens in a case like that? In my testing I can't find any downside to doing this, but I suspect there must be one.
Thanks,
Bob
People will be going back and forth between the two pages, which makes me want to open the database and table once and leave it open. The alternative is repeated opening/closing.. which must introduce quite a bit of overhead.
The problem is if the user simply leaves either page, which they presumably will at some point, the database will never be closed via an actual close statement.
What happens in a case like that? In my testing I can't find any downside to doing this, but I suspect there must be one.
Thanks,
Bob