Connecting Tech Pros Worldwide Forums | Help | Site Map

mysql collation

Bob Bedford
Guest
 
Posts: n/a
#1: Jul 17 '05
I've no access to mysql NG, so I ask here:

I've two identical tables (wich are created by usins the same script, but
must be separated).

When I execute a query wich return fields and do a UNION between them, I
get:
Illegal mix of collations for operation 'UNION'

I had an old mysql version on the server, and since my ISP upgraded, I have
problems with collations. The base is now in latin1_swedish_ci, and my datas
may manage french text.

Why the union doesn't work ? what do I need to do. The entire site is
working, but not this query. I get crazy.

What should I do, collation for both table are latin1_swedish_ci, and also
text fields.



Jerry Stuckle
Guest
 
Posts: n/a
#2: Jul 17 '05

re: mysql collation


Bob Bedford wrote:[color=blue]
> I've no access to mysql NG, so I ask here:
>
> I've two identical tables (wich are created by usins the same script,
> but must be separated).
>
> When I execute a query wich return fields and do a UNION between them, I
> get:
> Illegal mix of collations for operation 'UNION'
>
> I had an old mysql version on the server, and since my ISP upgraded, I
> have problems with collations. The base is now in latin1_swedish_ci, and
> my datas may manage french text.
>
> Why the union doesn't work ? what do I need to do. The entire site is
> working, but not this query. I get crazy.
>
> What should I do, collation for both table are latin1_swedish_ci, and
> also text fields.
>[/color]

Bob,

Just a wild guess - but check the collation on your connection. I had
several collation related problems because my tables were
latin1_swedish_ci and the connection was defaulting to utf8.

I have my own server, so I was able to change the default collation for
all connections. Since it looks like you can't do that, you can use the
SET NAMES to change it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Closed Thread