[Kamailio-Users] problems with artihmetics operations & MYSQL

BERGANZ François francois at acropolistelecom.net
Mon Jun 1 17:17:39 CEST 2009


I try to put decimal data to do a prepaid system!
In fact, I need to do operations like 25.24/0.15.
I cant do $var(a)=25.4/0.15;

I could see that if I do for example  $var(a)=166/100; $var(a)=1 ! ! !
How can I do to have $var(a)=1.66 ?

Thank you


Cordialement,
BERGANZ François
 Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.


-----Message d'origine-----
De : users-bounces at lists.kamailio.org [mailto:users-bounces at lists.kamailio.org] De la part de Saúl Ibarra
Envoyé : lundi 1 juin 2009 17:05
Cc : users at lists.kamailio.org
Objet : Re: [Kamailio-Users] problems with artihmetics operations & MYSQL

What field type are you trying to put the data in?


On Mon, Jun 1, 2009 at 4:51 PM, BERGANZ François
<francois at acropolistelecom.net> wrote:
> Hello,
>
>
>
> I need to select from a database (for example 25.6546)
>
> And I need to do  25.6546/60.
>
>
>
> I think that I have a problem with my MySQL database. I tried to insert the
> 25.6546 in a decimal(5,5) but I cant insert more than 0.99999 !
>
>
>
> Anyone know how to do ?
>
>
>
> Thank you
>
>
>
>
>
> Cordialement,
>
> BERGANZ François
>
> P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
>
>
>
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>



-- 
Saúl -- "Nunca subestimes el ancho de banda de un camión lleno de disketes."
----------------------------------------------------------------
http://www.saghul.net/

_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users at lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list