phpgroupware-developers
[Top][All Lists]
Advanced

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

Re: [Phpgroupware-developers] SQL Style Guide available


From: Michael Dean
Subject: Re: [Phpgroupware-developers] SQL Style Guide available
Date: 07 May 2003 20:31:31 -0500

On Wed, 2003-05-07 at 09:09, Jürgen Henge-Ernst wrote:
> On Wednesday 07 May 2003 15:42, Chris Weiss wrote:
> > >I am sorry to say - the "phpgw_" is redundant here and has no helpful
> > >meaning also
> >
> > no it is VERY needed for people on shared hosts who only get one database. 
> > It should be replaced with a config var so the admin can change phpgw_ to
> > whatever s/he wants.
> 
> This will require function like DB_TableName(name), DB_ColumnName(), .. and 
> so 
> on which translates tablename and columnanes in the manner the database 
> expect that name and may add a prefix/suffix for the table/column. If all 
> places in the application use such functions it is very easy to port the 
> application to another DB-System. If you are using DB2. e.g. the Columnames 
> are case-senistive if you put " around the columnname. Then the associative 
> Array of odbc_fetch_row also use those case-senitive names in the result and 
> no further transformation of that result must be made when the field is 
> fetched.

I don't see where this should be a problem.  Table names and column
names in query should always match the case they are defined with.

To boot, problems such as this should be dealt with in the database
layer so the developer is shielded from dealing with it.

Mike





reply via email to

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