PHP - error: Illegal mix of collations...

 
Vista:
Imágen de perfil de siREZ
Val: 23
Ha disminuido su posición en 95 puestos en PHP (en relación al último mes)
Gráfica de PHP

error: Illegal mix of collations...

Publicado por siREZ (203 intervenciones) el 24/07/2013 23:21:05
Cordial saludo.

al conectarme a la BD para leer una tabla me sale el siguiente error. No se que significa.

Illegal mix of collations (utf8mb4_spanish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

Que es esto?

gracias.

siREZ
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

error: Illegal mix of collations...

Publicado por Alexis Ochoa (92 intervenciones) el 25/07/2013 04:23:56
Puedes mostrar el código donde se encuentra el error?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de siREZ
Val: 23
Ha disminuido su posición en 95 puestos en PHP (en relación al último mes)
Gráfica de PHP

error: Illegal mix of collations...

Publicado por siREZ (203 intervenciones) el 25/07/2013 14:37:50
el código es el siguiente

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php
session_start();
header("Expires: Sun 25 Jul 1994 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
include('../Connections/myconexion.php');include('../Connections/post myconexion.php');
$titulo = htmlspecialchars($_GET["titulo"]);
$query_Recordset4 = "SELECT * FROM basico WHERE titulo1_barra1 = '$titulo'";
$Recordset4 = mysql_query($query_Recordset4, $myconexion) or die(mysql_error());
$row_Recordset4 = mysql_fetch_assoc($Recordset4);
$totalRows_Recordset4 = mysql_num_rows($Recordset4);
echo = str_replace("\n", "<br>", $row_Recordset4['texto1_barra1']);
 
?>


el error que sale es:

Illegal mix of collations (utf8mb4_spanish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

la estructuta de la tabla es:

--
-- Estructura de tabla para la tabla `basico`
--

CREATE TABLE IF NOT EXISTS `basico` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`titulo1_barra1` char(11) COLLATE utf8mb4_spanish_ci NOT NULL,
`texto1_barra1` longtext COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo2_barra1` char(11) COLLATE utf8mb4_spanish_ci NOT NULL,
`texto2_barra1` longtext COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo3_barra1` char(11) COLLATE utf8mb4_spanish_ci NOT NULL,
`texto3_barra1` longtext COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo4_barra1` char(11) COLLATE utf8mb4_spanish_ci NOT NULL,
`texto4_barra1` longtext COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo5_barra1` char(11) COLLATE utf8mb4_spanish_ci NOT NULL,
`texto5_barra1` longtext COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo6_barra1` char(11) COLLATE utf8mb4_spanish_ci NOT NULL,
`texto6_barra1` longtext COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo_derecho1` varchar(21) COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo_derecho2` varchar(21) COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo_derecho3` varchar(21) COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo_derecho4` varchar(21) COLLATE utf8mb4_spanish_ci NOT NULL,
`texto_derecho4` tinytext COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo_general` varchar(35) COLLATE utf8mb4_spanish_ci NOT NULL,
`tc_general` mediumtext COLLATE utf8mb4_spanish_ci NOT NULL,
`texto_general` longtext COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo1` varchar(15) COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo2` varchar(15) COLLATE utf8mb4_spanish_ci NOT NULL,
`tc_titulo1` varchar(255) COLLATE utf8mb4_spanish_ci NOT NULL,
`tc_titulo2` varchar(255) COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo_contacto` varchar(100) COLLATE utf8mb4_spanish_ci NOT NULL,
`texto_contacto` varchar(255) COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo_formulario` varchar(150) COLLATE utf8mb4_spanish_ci NOT NULL,
`tit1_contac` varchar(50) COLLATE utf8mb4_spanish_ci NOT NULL,
`tit2_contac` varchar(50) COLLATE utf8mb4_spanish_ci NOT NULL,
`tit3_contac` varchar(50) COLLATE utf8mb4_spanish_ci NOT NULL,
`tit4_contac` varchar(50) COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo_propiedades` varchar(255) COLLATE utf8mb4_spanish_ci NOT NULL,
`titulo_publicacion` varchar(256) COLLATE utf8mb4_spanish_ci NOT NULL,
`texto_publicacion` longtext COLLATE utf8mb4_spanish_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_spanish_ci AUTO_INCREMENT=2 ;

gracias

siREZ
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de siREZ
Val: 23
Ha disminuido su posición en 95 puestos en PHP (en relación al último mes)
Gráfica de PHP

encontre el error

Publicado por siREZ (203 intervenciones) el 25/07/2013 15:50:04
la instruccion:
mysql_query("SET NAMES 'utf8'");
que esta en el include('../Connections/post myconexion.php'); y en el script (2 veces)

crea conflicto con la la tabla creada con cotejamiento: utf8mb4_spanish_ci

pero no se porque sucede esto.

Alguien conoce sobre el tema?
Me pueden ayudar con esto?
donde puedo leer sobre este tema?

gracias.

siREZ
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de terra

encontre el error

Publicado por terra (62 intervenciones) el 25/07/2013 20:49:36
hola!
No se si ya encontraste la solucion. Googleando encontre algo...
miralo por si acaso...
http://www.forosdelweb.com/f86/problema-cotejamiento-1015257/
Saludos!!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar