From Ricardo.Keigo@br.bosch.com Wed Jun 29 19:35:56 2011 From: "Andrade Ricardo (CI/AFU1)" To: sr-users@lists.kamailio.org Subject: [SR-Users] "select count(*)" with avp_db_query always returns null Date: Wed, 29 Jun 2011 19:35:48 +0200 Message-ID: <268C7AED54EDF64F808B167324D2CBF91A0815E133@SI-MBX18.de.bosch.com> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2005181111==" --===============2005181111== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hi list, Perhaps this fits better into a bug report, but I'd like to know if somebody = out there experienced a similar issue. I am executing a "select count" query using the avp_db_query function, but it= is not storing the results in any avp. Other queries are working fine. I use db_mysql connected with a mysql 5.1 server. I have tested this with kamailio-3.1.0 and kamailio-3.1.3, both didn't work. = In an old box (version 1.3.x), the same query was returning the correct value. --------------------------------------------------- Here is the case which is not working: Code: avp_delete("$avp(s:count)"); $var(ret) =3D avp_db_query("SELECT count(*) FROM subscriber where username=3D= 'foo'", "$avp(s:count)"); xlog("L_INFO", "var(ret)=3D$var(ret) avp(s:count)=3D$avp(s:count)"); Output: INFO: