New functions to avoid dealing with emysql records