Steve
Steve

Reputation: 3095

CF10 concatenated mysql string as binary data

I'm working on moving a site from CF8 to CF10 and just came across something I wasn't expecting. My MySQL query has a simple concatenate to combine a company ID with company name as such:

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

On CF8, this returns a string I can just as my display value on a cfselect.

998 - Company A
999 - Company B

etc.

However, on CF10 when I dump the query it's showing as binary data and I have to use toString() on the output.

I knew there were some gotchas that required using toString() when returning encrypted data that weren't there before, but I'm not sure why it's doing this on a simple string concatenation.

[update] Can this be changed through a connect string or other server wide setting? I know I can use toString() on output, or CAST() in the query, but something server wide would be ideal. The MySQL server is the same server, so there's no version change there.

Upvotes: 4

Views: 695

Answers (1)

John Woo
John Woo

Reputation: 263893

convert the number into string,

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

Upvotes: 5

Related Questions