Fixing fetch results functions returning mysql_result instead of row data