core: fix spec of function.
core: better error messages for z_db:q and q1 in case of sql errors.