I tried to select (for example) 2 Double to test IF FIRST > SECOND.
The solution for me is:
SELECT IF(FIRST > SECOND,'yes','no') WHERE
CLIENT='$avp(s:12)';
If ($avp(s:12) == "yes") {
...
}
Cordialement,
BERGANZ François
http://www.acropolistelecom.net
Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
-----Message d'origine-----
De : Alex Balashov [mailto:abalashov@evaristesys.com]
Envoyé : mercredi 16 septembre 2009 09:07
À : BERGANZ François
Cc : 'Brandon Armstead'; users(a)lists.kamailio.org
Objet : Re: [Kamailio-Users] avp_db_query to SELECT a DOUBLE colomn
Bear in mind that neither the avpops module nor the newer sqlops
module (in 1.5.x releases) can handle many idiosyncratic datatypes.
They pretty much deal with INTEGERs and VARCHARs. Everything else is
a tossup. For example, a PostgreSQL BIGINT is unintelligible to
sqlops, I found out.
BERGANZ François wrote:
I am using kamailio 1.4.3-notls
Cordialement,
BERGANZ François
P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
*De :* Brandon Armstead [mailto:brandon@cryy.com]
*Envoyé :* mardi 15 septembre 2009 19:07
*À :* BERGANZ François
*Cc :* users(a)lists.kamailio.org
*Objet :* Re: [Kamailio-Users] avp_db_query to SELECT a DOUBLE colomn
Hello,
CAST the result as a CHAR/VARCHAR. Also what version of kamailio
are you running?
On Tue, Sep 15, 2009 at 6:53 AM, BERGANZ François
<francois(a)acropolistelecom.net <mailto:francois@acropolistelecom.net>>
wrote:
Hello,
I need help.
I try to select a DOUBLE(10,4).
Kamailio report <null>.
Example:
avp_db_query("select CREDIT from subscriber where
client='$avp(s:679)'",
"$avp(i:513)");
$avp(i:513) is null!
But in my database, it is 15.0000
Know you how to do ?
Cordialement,
BERGANZ François
cid:image001.gif@01C8F7CD.6BC1D2C0
http://www.acropolistelecom.net <http://www.acropolistelecom.net/>
P Pensez à l'Environnement, n'imprimez ce mail que si nécessaire.
_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users(a)lists.kamailio.org <mailto:Users@lists.kamailio.org>
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
------------------------------------------------------------------------
_______________________________________________
Kamailio (OpenSER) - Users mailing list
Users(a)lists.kamailio.org
http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
--
Alex Balashov - Principal
Evariste Systems
Web :
http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671