Database Connections

    Date: 12/04/09 (PHP Community)    Keywords: database

    Hi Guys!

    Another dumb question from the peanut gallery!

    If you're writing a bunch of classes that will run an application, where is the best place to have your database connection(s)? Would it be in the file that ends up interfacing with the user and receiving/displaying data, in the class files themselves, or some other location?

    Thanks!

    Edit: If the answer is in the calling files, how would you make sure your classes used it, and how would you pass it across pageclicks?

    Source: https://php.livejournal.com/674926.html

« Hmm... || Do x to items 1-7, then y... »


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