Re: Re: DB_Table: Summary and Pre-Call
| From: | Daniel Convissor | Date: | Mon, 12 Apr 2004 15:22:59 +0000 |
| Subject: | Re: Re: DB_Table: Summary and Pre-Call | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-27461@lists.php.net to get a copy of this message | ||
Hi Paul:
On Mon, Apr 12, 2004 at 10:04:20AM -0500, Paul M Jones wrote:
> One problem is that the solutions you note on that page require in some
> cases that the end-user be able to control the database system
> settings.
I don't think that's an issue. All one needs to do is issue a particular
query which alters one's own session -- or at least that's how it seems to
have worked for me while I was testing. But hey, I'm running the DBMS's,
so some permissions settings might be more favorable to me.
> Another problem as it relates to DB_Table is that a query written for,
> say, Oracle (using the TO_CHAR function to convert from the native date
> format to ISO standard) will not work for Microsoft SQL Server (which
> uses a DATEFORMAT function).
In the one application I need 100% portability, I've created a method
which detects which DBMS is being used (via 'phptype') and then returns
the appropriate formatting clause which then gets used in the query
string.
I'm thining of adding something similar to DB.
Enjoy,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409