Hopefully this is an easy question. I need to set the default numeric data
format when selecting data from an oracle database using PHP OCI interface.
The SQLPLUS command is:
SET NUMBERFORMAT 0.999
How would I send this from PHP? I need to do the format at the datebase server
instead
>
> > Is this a bug or am I missing something.
>
> It's a bug -- see http://bugs.php.net/bug.php?id=30726
>
> Reported fixed on 18-Jan-2005, so I guess you're looking at
> 4.3.11/5.0.4 to actually contain the fix.
>
> Cheers!
>
> Mike
>
>
>
> Possible work-around:
> I suspect that
> $p1[14] = "-0.15" + 0;
> will do what you want, since the leading 0 will probably
> trigger the regex properly.
>
> Try it and see.
Changing it to -0.15 + 0 works. This data is actually coming from a numeric
field in an Oracle database using the OC
I am not sure if this is a bug or I am just doing something dumb but I am
having a problem with automatic converting of strings to a number between 0 and
-1. For example:
$p1 = Array ( 0 => "-.15",
1 => "-.15" + 0,
2 => (float) "-.15" + 0,
5 => "-1.15
4 matches
Mail list logo