buenas tengo este error pero si tengo todos los campos, por que podría ser??
controlador
print_r(implode(',',(array)$_POST['data']));
$data = implode(',',(array)$_POST['data']);
$data = str_replace("[","",$data);
$data = str_replace("]","",$data);
$data = str_replace("\"", "'", $data);
print_r($data);
$this->model->insert($data);
Modelo
$qry = "INSERT INTO `tabla`(`form_avl_1`,`form_avl_2`,`form_avl_3`,
`form_avl_4`,`form_avl_5`,`form_avl_6`,`form_avl_7`,`form_avl_8`,`form_avl_9`,`form_avl_10`,
`form_avl_11`,`form_avl_12`,`form_avl_13`,`form_avl_14`,`form_avl_15`,`form_avl_16`,
`form_avl_17`,`form_avl_18`,`form_avl_19`,`form_avl_20`,`form_avl_21`,`form_avl_22`,
`form_avl_23`,`form_avl_24`,`form_avl_25`,`form_avl_26`,`form_avl_27`,`form_avl_28`,
`form_avl_29`,`form_avl_30`,`form_avl_31`,`form_avl_32`,`form_avl_33`,`form_avl_34`,
`form_avl_35`,`form_avl_36`,`form_avl_37`,`form_avl_38`,`form_avl_39`,`form_avl_40`,
`form_avl_41`,`form_avl_42`,`form_avl_43`,`form_avl_44`,`form_avl_45`,`form_avl_46`,
`form_avl_47`,`form_avl_48`,`form_avl_49`,`form_avl_50`,`form_avl_51`,`form_avl_52`,
`form_avl_53`,`form_avl_54`,`form_avl_55`,`form_avl_56`,`form_avl_57`,`form_avl_58`,
`form_avl_59`,`form_avl_60`,`form_avl_61`,`form_avl_62`,`form_avl_63`,`form_avl_64`,
`form_avl_65`,`form_avl_66`,`form_avl_67`,`form_avl_68`,`form_avl_69`,`form_avl_70`,
`form_avl_71`,`form_avl_72`,`form_avl_73`,`form_avl_74`,`form_avl_75`,`form_avl_76`,
`form_avl_77`,`form_avl_78`,`form_avl_79`,`form_avl_80`,`form_avl_81`,`form_avl_82`,
`form_avl_83`,`form_avl_84`,`form_avl_85`,`form_avl_86`,`form_avl_87`,`form_avl_88`,
`form_avl_89`,`form_avl_90`,`form_avl_91`,`form_avl_92`,`form_avl_93`,`form_avl_94`,
`form_avl_95`,`form_avl_96`,`form_avl_97`,`form_avl_98`,`form_avl_99`,`form_avl_100`,
`form_avl_101`,`form_avl_102`,`form_avl_103`,`form_avl_104`,`form_avl_105`,`form_avl_106`,
`form_avl_107`,`form_avl_108`,`form_avl_109`,`form_avl_110`)VALUES('".$data."');";
return $this->db->query($qry)->result();
imprime el error de base de datos (Column count doesn't match value count at row 1) pero no encuentro el error asi tal como lo puse lo hice separandolo para saber bien si me hace falta un campo pero no, el values es un array
INSERT INTO `prueba`.`tabla`(`form_avl_1`,`form_avl_2`,`form_avl_3`, `form_avl_4`,`form_avl_5`,`form_avl_6`,`form_avl_7`,`form_avl_8`,`form_avl_9`,`form_avl_10`, `form_avl_11`,`form_avl_12`,`form_avl_13`,`form_avl_14`,`form_avl_15`,`form_avl_16`, `form_avl_17`,`form_avl_18`,`form_avl_19`,`form_avl_20`,`form_avl_21`,`form_avl_22`, `form_avl_23`,`form_avl_24`,`form_avl_25`,`form_avl_26`,`form_avl_27`,`form_avl_28`, `form_avl_29`,`form_avl_30`,`form_avl_31`,`form_avl_32`,`form_avl_33`,`form_avl_34`, `form_avl_35`,`form_avl_36`,`form_avl_37`,`form_avl_38`,`form_avl_39`,`form_avl_40`, `form_avl_41`,`form_avl_42`,`form_avl_43`,`form_avl_44`,`form_avl_45`,`form_avl_46`, `form_avl_47`,`form_avl_48`,`form_avl_49`,`form_avl_50`,`form_avl_51`,`form_avl_52`, `form_avl_53`,`form_avl_54`,`form_avl_55`,`form_avl_56`,`form_avl_57`,`form_avl_58`, `form_avl_59`,`form_avl_60`,`form_avl_61`,`form_avl_62`,`form_avl_63`,`form_avl_64`, `form_avl_65`,`form_avl_66`,`form_avl_67`,`form_avl_68`,`form_avl_69`,`form_avl_70`, `form_avl_71`,`form_avl_72`,`form_avl_73`,`form_avl_74`,`form_avl_75`,`form_avl_76`, `form_avl_77`,`form_avl_78`,`form_avl_79`,`form_avl_80`,`form_avl_81`,`form_avl_82`, `form_avl_83`,`form_avl_84`,`form_avl_85`,`form_avl_86`,`form_avl_87`,`form_avl_88`, `form_avl_89`,`form_avl_90`,`form_avl_91`,`form_avl_92`,`form_avl_93`,`form_avl_94`, `form_avl_95`,`form_avl_96`,`form_avl_97`,`form_avl_98`,`form_avl_99`,`form_avl_100`, `form_avl_101`,`form_avl_102`,`form_avl_103`,`form_avl_104`,`form_avl_105`,`form_avl_106`, `form_avl_107`,`form_avl_108`,`form_avl_109`,`form_avl_110`)VALUES(
'"si_1", "si_2", "si_3", "si_4", "si_5", "si_6", "si_7", "si_8", "si_9", "si_10", "si_11", "si_12", "si_13", "si_14", "si_15", "si_16", "si_17", "si_18", "si_19", "si_20", "si_21", "si_22", "si_23", "si_24", "si_25", "si_26", "si_27", "si_28", "si_29" ,"si_30", "si_31", "si_32", "si_33", "si_34", "si_35", "si_36", "si_37", "si_38", "si_39", "si_40", "si_41", "si_42", "si_43", "si_44", "si_45", "si_46", "si_47", "si_48", "si_49", "si_50", "si_51", "si_52", "si_53", "si_54", "si_55", "si_56", "si_57", "si_58", "si_59", "si_60" ,"si_61", "si_62", "si_63", "si_64", "si_65", "si_66", "si_67" ,"si_68", "si_69", "si_70", "si_71", "si_72", "si_73", "si_74", "si_75", "si_76", "si_77", "si_78", "si_79", "si_80", "si_81", "si_82", "si_83", "si_84", "si_85", "si_86", "si_87", "si_88", "si_89", "si_90", "si_91", "si_92", "si_93", "si_94", "si_95", "si_96", "si_97", "si_98", "si_99", "si_100", "si_101", "si_102", "si_103", "si_104", "si_105", "si_106", "si_107", "si_108", "si_109", "si_110"');
Aqui empieza mi print del data ["si_1","si_2","si_3","si_4","si_5","si_6","si_7","si_8","si_9","si_10","si_11","si_12","si_13","si_14","si_15","si_16","si_17","si_18","si_19","si_20","si_21","si_22","si_23","si_24","si_25","si_26","si_27","si_28","si_29","si_30","si_31","si_32","si_33","si_34","si_35","si_36","si_37","si_38","si_39","si_40","si_41","si_42","si_43","si_44","si_45","si_46","si_47","si_48","si_49","si_50","si_51","si_52","si_53","si_54","si_55","si_56","si_57","si_58","si_59","si_60","si_61","si_62","si_63","si_64","si_65","si_66","si_67","si_68","si_69","si_70","si_71","si_72","si_73","si_74","si_75","si_76","si_77","si_78","si_79","si_80","si_81","si_82","si_83","si_84","si_85","si_86","si_87","si_88","si_89","si_90","si_91","si_92","si_93","si_94","si_95","si_96","si_97","si_98","si_99","si_100","si_101","si_102","si_103","si_104","si_105","si_106","si_107","si_108","si_109","si_110"]
esto contiene mi data
Este es mi nuevo data quitandole los [] y las "" reemplazandolas por ', ya no me marca el error de antes ahora solo me dice error sintaxis en linea 21
'si_1','si_2','si_3','si_4','si_5','si_6','si_7','si_8','si_9','si_10','si_11','si_12','si_13','si_14','si_15','si_16','si_17','si_18','si_19','si_20','si_21','si_22','si_23','si_24','si_25','si_26','si_27','si_28','si_29','si_30','si_31','si_32','si_33','si_34','si_35','si_36','si_37','si_38','si_39','si_40','si_41','si_42','si_43','si_44','si_45','si_46','si_47','si_48','si_49','si_50','si_51','si_52','si_53','si_54','si_55','si_56','si_57','si_58','si_59','si_60','si_61','si_62','si_63','si_64','si_65','si_66','si_67','si_68','si_69','si_70','si_71','si_72','si_73','si_74','si_75','si_76','si_77','si_78','si_79','si_80','si_81','si_82','si_83','si_84','si_85','si_86','si_87','si_88','si_89','si_90','si_91','si_92','si_93','si_94','si_95','si_96','si_97','si_98','si_99','si_100','si_101','si_102','si_103','si_104','si_105','si_106','si_107','si_108','si_109','si_110'
$data = str_replace("[","",$data); $data = str_replace("]","",$data);
¿quizá ignoras que hay en PHP miles de funciones para casi todo? Y si no existen no hay problema, se pueden inventar. Sería de gran ayuda que explicaras un poco lo que quieres hacer.