Ver Mensaje Individual
  #3 (permalink)  
Antiguo 22/02/2014, 05:49
Cota_Isla
 
Fecha de Ingreso: noviembre-2012
Mensajes: 184
Antigüedad: 11 años, 5 meses
Puntos: 0
Respuesta: Tipo de datos Tintyint

Este es mi código:

CREATE TABLE IF NOT EXISTS `sala` (
`id` tinyint(2) unsigned NOT NULL AUTO_INCREMENT,
`nom` varchar(25) NOT NULL,
`descrip` text NOT NULL,
`planta` enum('Baja','Primera','Segunda','Tercera','Cuarta' ) NOT NULL,
`uso` tinyint(1) unsigned NOT NULL DEFAULT '0',
`img` varchar(65) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
UNIQUE KEY `nombre` (`nom`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

sería la variable uso.
Ahora la intento añadir y me muestra cuando selecciono el tipo BIT un popup con un mensaje de: ¡Esto no es un número! Ya le introduzca alguna longitud o no... y antes me ha dejado... que raro...

Vamos en conclusion es lo que quiero almacenar en la variable uso si es 1 o 0 porque como la tengo en el create table me admite por ejemplo el valor 52...