php - Query codeigniter inserts only 1 in mysql DB with bit data type -


hi i'm having problems queries, when run ci query, inserts '1' in columns, tried running query directly in phpmyadmin , same,then inserted data phpmyadmin , create different query , inserted correctly. created phpmyadmin:

insert `estancias`.`instalacion` (`idinstalacion`, `sala_lactantes`, `sala_maternales`, `sala_preescolar`, `sala_usos_mult`, `a_recepcion`, `a_administrativa`, `sillas`, `archiveros`, `cuna_observacion`, `basc_estadimetro`, `botiquin`, `s_atencion_cunas`, `colchonetas`, `mesas_sillas_infantiles`, `muebles_guarda`, `area_lactancia`, `cocina_com_desp`, `consultorio`, `inst_sanitarias_ninos`, `inst_sanitarias_personal`, `area_juegos`, `area_educacion_preescolar`, `ventilacion`, `iluminacion`, `agua_potable`, `espacio_ninos`) values (null, b'1', b'1', b'1', b'1', b'1', b'0', b'0', b'0', b'0', b'0', b'0', b'0', b'0', b'0', b'0', b'0', b'0', b'0', b'0', '', b'0', b'0', b'0', b'0', b'0', b'0'); 

and codeigniter data $_request , setted $instalacion:

$this->db->insert('instalacion',$instalacion);  insert `instalacion` (`sala_lactantes`, `sala_maternales`, `sala_preescolar`, `sala_usos_mult`, `a_recepcion`, `a_administrativa`, `sillas`, `archiveros`, `cuna_observacion`, `basc_estadimetro`, `botiquin`, `s_atencion_cunas`, `colchonetas`, `mesas_sillas_infantiles`, `muebles_guarda`, `area_lactancia`, `cocina_com_desp`, `consultorio`, `inst_sanitarias_ninos`, `inst_sanitarias_personal`, `area_juegos`, `area_educacion_preescolar`, `ventilacion`, `iluminacion`, `agua_potable`, `espacio_ninos`) values ('1', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'); 

thank advance participation!

you may select varchar2 data type field except id must integer.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -