in reply to Re^6: CGI Action callin thread CGI Action call
That's because $result is undefined, ie no records were found so you need to decide how to handle that. You could simply encode an empty hash.