phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-developers] Re: Phpgroupware-developers digest, Vol 1 #246


From: Pim Snel
Subject: [Phpgroupware-developers] Re: Phpgroupware-developers digest, Vol 1 #246 - 10 msgs
Date: 23 May 2002 07:06:59 +0000

Thanks for the class information. I'm now busy with a rewrite of my
cms-app removing all the mysql-functions.

Pim Snel

Op wo 22-05-2002, om 14:12 schreef
address@hidden:
> Message: 5
> Date: Wed, 22 May 2002 07:20:19 -0500
> From: Miles Lott <address@hidden>
> To:  address@hidden
> Subject: Re: [Phpgroupware-developers] connect to and query other databases
> Reply-To: address@hidden
> 
> $other = CreateObject('phpgwapi.db');
> $other->Host     = 'dbhost.mydomain.com';
> $other->Type     = 'pgsql';
> $other->Database = 'notphpgw';
> $other->User     = 'someuser';
> $other->Password = 'somepass';
> 
> There you have a new db object ready to query another db.
> 
> $other->query('SELECT * FROM strange_table WHERE field=' . 
> $account_id,__LINE__,__FILE__);
> 
> ...
> 
> Pim Snel wrote:
> > Hello all,
> > 
> > Can somebody tell me how I can use functions from the phpgwapi to connect 
> > to another database
> > and do queries on it? At the moment I use direct mysql_query and connect 
> > functions. I know
> > this is a bad thing to do.
> > 
> > Maybe you can give me a phpgw equal to the following:
> > 
> >    $conn=mysql_pconnect($localhost,$user,$database);
> >    mysql_select_db($database, $conn);
> > 
> >    $SQL='SELECT * FROM '. $table . ' WHERE';
> >    $result=mysql_query($SQL,$connection);
> > 
> > I'm working on a multiuser/multisite contentmanagement system in phpGW 
> > which works with a
> > single database per site. It's kind of a phpMyAdmin with specified 
> > contentmanagement tasks
> > an capabilities like uploading images and containing relations between 
> > tables.
> > 
> > I'll give you all a preview when it's more stable.
> > 
> > Thanks
> > 
> > Pim Snel





reply via email to

[Prev in Thread] Current Thread [Next in Thread]