Re: oracle question

From: Date: Mon, 03 Jan 2005 18:41:34 +0000
Subject: Re: oracle question
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-35317@lists.php.net to get a copy of this message
Justin Patrin wrote:
On Mon, 03 Jan 2005 17:04:17 +0100, Lukas Smith <lsmith@php.net> wrote:
Hi, I was just wondering if maybe some oracle expert can shed some light on this. I am trying to use native prepared support as much as possible in the oracle driver and I have encountered an issue with the way MDB2 is currently handling dates for oracle. Essentially all date values are wrapped in a TO_DATE() call. This has been directly taken from Metabase. I also set the following at connect: ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS' Now oracle doesnt like me using a function call for bound parameters. I may be able to get around this by sticking the actual value into the TO_DATE() call, but this gets messy as I would then have to replace the actual placeholder even if its already an oracle style ":foobar" placeholder. So the question is do I even need the TO_DATE() call if I see the NLS_DATE_FORMAT?
As long as you change the format, any date you send in with that format will work. What if a user's program changes this, though?
I am tempted to ignore this issue. However it should be noted in the docs .. err wiki .. somewhere :-) regards, Lukas

« previous php.pear.dev (#35317) next »