Re: Re: querying more than one db from a php page?
| From: | toby z | Date: | Sat, 13 Dec 2003 06:38:01 +0000 |
| Subject: | Re: Re: querying more than one db from a php page? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-22379@lists.php.net to get a copy of this message | ||
hay george
it can be done .....
i dunno what u ment by "manually" justin,
as i wlasys have to connect to a databse -> writin a small piece of
code (i include a connect file) in every page i need to run about ma
database.....
so if thats what manuall access means ..... i guess thats what you
have to do .....
n george ..... i connect to db1 on a page then to db2 n then again to
db1 on the same page .....
so far .... its workin fine .... has been for the last i dont know 6
months i guess .....
u just need to be carefull about connecting to the right database n
checkin updates on ur local machine before u start off at server :)
could end up in a mess :)
good luck .....
toby
--- Justin Patrin <papercrane@reversefold.com> wrote: > George
Pitcher wrote:
>
> > Hi,
> >
> > I am developing my main site to run on php/mysql (currently
> > lasso/filemaker).
> >
> > I am also developing some individual sites to be hosted on the
> same server
> > as my main one and I'd like to be able to update those smaller
> site
> > databases when activity happens on the main site.
> >
> > I'm still a couple of months away from tackling that part but can
> anyone
> > predict trouble ahead, and if so, any remedies?
> >
> > MTIA
> >
> > George in Oxford/Edinburgh
>
> Well, if you use the DB functions directly, you:
> 1) limit yourself to the use of a single database system.
> 2) will have to manually select your db every time you change
> databases
> within one script.
>
> I would highly suggest using a DB abstraction class, such as
> PEAR::DB.
> http://pear.php.net/package/DB
>
> --
> paperCrane <Justin Patrin>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
________________________________________________________________________
BT Yahoo! Broadband - Save £80 when you order online today. Hurry! Offer ends 21st December 2003.
The way the internet was meant to be. http://uk.rd.yahoo.com/evt=21064/*http://btyahoo.yahoo.co.uk