CF10 concatenated mysql string as binary data

I am working on moving a site from CF8 to CF10 and just stumbled upon something I did not expect. My MySQL query has a simple combination to combine the company identifier with the company name as such:

SELECT CONCAT(co_coid, ' - ',co_company) AS IDCONAME 

In CF8, this returns a string that I can use as the display value on cfselect.

 998 - Company A 999 - Company B 

and etc.

However, on CF10, when I dump a request that displays as binary data, and I have to use toString () on the output.

I knew there were some gotchas that required the use of toString () when returning encrypted data that did not exist before, but I'm not sure why this is done with a simple string concatenation.

[update] Can this be changed through the connection string or other setting on the server? I know that I can use toString () for output or CAST () in the request, but something common on the server would be ideal. The MySQL server is the same server, so there is no version there.

+4
source share
1 answer

converts a number to a string,

 SELECT CONCAT(CAST(co_coid AS CHAR(15)), ' - ',co_company) AS IDCONAME 
+5
source

All Articles