Código PHP:
Ver original
[I]PDOException[/I]: SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1: INSERT INTO {eventos} (nid, title, ciudad, lugar, fecha, descripcion) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4_month, :db_insert_placeholder_4_day, :db_insert_placeholder_4_year, :db_insert_placeholder_5_value, :db_insert_placeholder_5_format); Array ( [:db_insert_placeholder_0] => 12 [:db_insert_placeholder_1] => asdf [:db_insert_placeholder_2] => adsf [:db_insert_placeholder_3] => adsf [:db_insert_placeholder_4_month] => 5 [:db_insert_placeholder_4_day] => 29 [:db_insert_placeholder_4_year] => 2012 [:db_insert_placeholder_5_value] => <p> adsf</p> [:db_insert_placeholder_5_format] => filtered_html ) in [I]eventos_node_insert()[/I] (line [I]70[/I] of [I]/Applications/MAMP/htdocs/p_drupal/sites/all/modules/eventos/eventos.module[/I]).
Esta es la estructura de la tabla que se crea con el eventos.install
Y esta es la funcion eventos_node_insert
Código PHP:
Ver original
function eventos_node_insert($node) { db_insert('eventos') 'nid' => $node->nid, 'title' => $node->title, 'ciudad' => $node->ciudad, 'lugar' => $node->lugar, 'fecha' => $node->fecha, 'descripcion' => $node->descripcion, )) ->execute(); }
Probe con eventos_insert y eventos_node_insert ambas dan el mismo error...
Espero puedan ayudarme... Gracias...