Merged Mysql multiple result sets code to fix UnwashedMeme/clsql#17