Re: [PHP] Database includes

2007-08-28 Thread Chris
brian wrote: Larry Garfield wrote: On Tuesday 28 August 2007, brian wrote: If you have to modify anything other than a single config file in order to move your site/app from one server to another, then you have a design flaw. (I'd say that applies for moving the site to a subdirectory on a

Re: [PHP] Database includes

2007-08-28 Thread brian
Larry Garfield wrote: On Tuesday 28 August 2007, brian wrote: If you have to modify anything other than a single config file in order to move your site/app from one server to another, then you have a design flaw. (I'd say that applies for moving the site to a subdirectory on a server too, but

Re: [PHP] Database includes

2007-08-28 Thread Larry Garfield
On Tuesday 28 August 2007, brian wrote: > > If you have to modify anything other than a single config file in order > > to move your site/app from one server to another, then you have a design > > flaw. (I'd say that applies for moving the site to a subdirectory on a > > server too, but that takes

Re: [PHP] Database includes

2007-08-28 Thread brian
Larry Garfield wrote: On Sunday 26 August 2007, Bruce Cowin wrote: I'm curious as to how everyone organises and includes their classes in PHP5. Then have a config file of some sort in which you specify your DB credentials. There's a variety of ways to do that (ini file, a PHP file with a da

Re: [PHP] Database includes

2007-08-27 Thread Bruce Cowin
Thanks to everyone who responded. Some really interesting ideas. I'll try them out. Regards, Bruce >>> "Wouter van Vliet / Interpotential" <[EMAIL PROTECTED]> 28/08/2007 8:34 a.m. >>> On 27/08/07, Stut <[EMAIL PROTECTED]> wrote: > I use a slightly different approach to prevent the need to me

Re: [PHP] Database includes

2007-08-27 Thread Wouter van Vliet / Interpotential
On 27/08/07, Stut <[EMAIL PROTECTED]> wrote: > I use a slightly different approach to prevent the need to mess about > with files when moving to production. At the end on config.php I have > this... > > if (file_exists('config_dev.php')) > require 'config_dev.php'; I've got my own variation

Re: [PHP] Database includes

2007-08-27 Thread Stut
Chris wrote: Bruce Cowin wrote: I'm curious as to how everyone organises and includes their classes in PHP5. Let's take a simple example that has 3 classes: customer, order, and database. The database class has a base sql db class (I know there is PDO and other things but this class is already

Re: [PHP] Database includes

2007-08-26 Thread Richard Lynch
On Sun, August 26, 2007 9:16 pm, Bruce Cowin wrote: > I'm curious as to how everyone organises and includes their classes in > PHP5. Let's take a simple example that has 3 classes: customer, > order, > and database. The database class has a base sql db class (I know > there > is PDO and other thi

Re: [PHP] Database includes

2007-08-26 Thread Chris
Bruce Cowin wrote: I'm curious as to how everyone organises and includes their classes in PHP5. Let's take a simple example that has 3 classes: customer, order, and database. The database class has a base sql db class (I know there is PDO and other things but this class is already written and w

Re: [PHP] Database includes

2007-08-26 Thread Larry Garfield
On Sunday 26 August 2007, Bruce Cowin wrote: > I'm curious as to how everyone organises and includes their classes in > PHP5. Let's take a simple example that has 3 classes: customer, order, > and database. The database class has a base sql db class (I know there > is PDO and other things but thi

[PHP] Database includes

2007-08-26 Thread Bruce Cowin
I'm curious as to how everyone organises and includes their classes in PHP5. Let's take a simple example that has 3 classes: customer, order, and database. The database class has a base sql db class (I know there is PDO and other things but this class is already written and working) and classes t