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

Liviu Chircu liviu at opensips.org
Tue Mar 10 16:44:53 EST 2020


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

-- 
Liviu Chircu
www.twitter.com/liviuchircu | www.opensips-solutions.com

OpenSIPS Summit, Amsterdam, May 2020
   www.opensips.org/events




More information about the Users mailing list