I also
noticed, that it does not seem to be possible to get the number
of result rows of avp_db_query - may (in the case of an successful
query) can the function return the number of results for example?
The avp_db_query is a bit a deprecated function, take a look to the 'sqlops'
module, which provides a more advanced interface. I think it also export the
number of rows.