Ver Mensaje Individual
  #3 (permalink)  
Antiguo 17/04/2014, 20:34
quico5
 
Fecha de Ingreso: enero-2008
Mensajes: 580
Antigüedad: 16 años, 3 meses
Puntos: 9
Respuesta: Crear y Conectar a Database>Table>Campo usando utf8

he comprobado que si creo la base de datos mediante el asistente de PHPMyAdmin, y después creo la tabla poniendo los dos campos a UTF8 funciona

buscando el equivalente SQL para PHPMyAdmin he probado la siguiente variable
Código:
CREATE TABLE post (
	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
	titulo VARCHAR(50) CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci,
	cuerpo TEXT CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci
);
Pero me devuelve
Cita:
Error
consulta SQL:



CREATE TABLE post (
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
titulo VARCHAR(50) CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci,
cuerpo TEXT CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci
);
MySQL ha dicho: Documentación

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci,
cuerpo TEXT CONVERT TO ' at line 3