Attaching image files to nodes programmatically in Drupal 7
Hi,when I accroding this artical ,but met an pdo error:
PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'field_pr_quotation_file_display' cannot be null: INSERT INTO {field_data_field_pr_quotation_file} (entity_type, entity_id, revision_id, bundle, delta, language, field_pr_quotation_file_fid, field_pr_quotation_file_display, field_pr_quotation_file_description) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8); Array ( [:db_insert_placeholder_0] => node [:db_insert_placeholder_1] => 136 [:db_insert_placeholder_2] => 249 [:db_insert_placeholder_3] => purchase_request [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => und [:db_insert_placeholder_6] => 24 [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => ) in field_sql_storage_field_storage_write() (line 451 of D:\www\Sites\pr\modules\field\modules\field_sql_storage\field_sql_storage.module).