[OpenSIPS-Users] MySQL Type: FIELD_TYPE_NEWDECIMAL (246) uses DB_INT result type but should use float

Brett Nemeroff brett at nemeroff.com
Tue Mar 10 16:48:48 EST 2020


Totally agree that this is the right thing to do. I just wanted the list to
know it’s a STRING. I don’t think it’s obvious.

Thanks again!!


On Tue, Mar 10, 2020 at 11:45 AM Liviu Chircu <liviu at opensips.org> wrote:

> On 10.03.2020 18:39, Brett Nemeroff wrote:
> > This isn’t really a problem unless you are going to math it or push it
> > into something else without casting it.
>
> I agree, but at script level, there is no support for manipulating
> "long" integers,
> let along "double" precision integers.  So casting the "double" number
> to a string
> within avpops and returning it to the script seemed like a pretty good
> workaround.
>
> Additionally, this doesn't stop you from doing floating point math in
> the script using mathops [1]!
>
> [1]: https://opensips.org/docs/modules/3.1.x/mathops.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200310/26f0d4bf/attachment.html>


More information about the Users mailing list