On 04/05/2014 11:42 AM, Fred Posner wrote:
When I use xquery, I generally use it with a stored procedure that returns a value if not matched... so I always return at least one row with a variable of 'fail', -1, etc. to evaluate.
I actually do that too in many cases, but only because I often need to pass back additional data about what went wrong (for logging) if no row was found, so returning a row regardless, with a status column (with a value like -1) and hijacking another column for some kind of human-readable explanation.
I like this for a variety of reasons (ie changing sql without changing the config)... but that being said... Wouldn't this still work for you: if($dbr(gateways=>rows)>0) { }
I don't think so. As I understood the documentation, at least, $dbr doesn't get populated in this case; the rows just go straight to an xavp list. I suppose I should verify that.
-- Alex Balashov - Principal Evariste Systems LLC 235 E Ponce de Leon Ave Suite 106 Decatur, GA 30030 United States Tel: +1-678-954-0670 Web: http://www.evaristesys.com/, http://www.alexbalashov.com/ _______________________________________________ SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users