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.