General error: 1366 Incorrect integer value while uploading image I am using Drupal 7 and I got the following error while uploading an image.
PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'field_third_section_image_width' at row 1:
INSERT INTO {field_data_field_third_section_image} (entity_type, entity_id, revision_id, bundle, delta, language, field_third_section_image_fid, field_third_section_image_alt, field_third_section_image_title, field_third_section_image_width, 
field_third_section_image_height) 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, :db_insert_placeholder_9, :db_insert_placeholder_10);
     Array ( [:db_insert_placeholder_0] =&gt; node 
    [:db_insert_placeholder_1] =&gt; 107 
    [:db_insert_placeholder_2] =&gt; 107 
    [:db_insert_placeholder_3] =&gt; page 
    [:db_insert_placeholder_4] =&gt; 0 
    [:db_insert_placeholder_5] =&gt; und 
    [:db_insert_placeholder_6] =&gt; 12464 
    [:db_insert_placeholder_7] =&gt; 
    [:db_insert_placeholder_8] =&gt; 
    [:db_insert_placeholder_9] =&gt; 
    [:db_insert_placeholder_10] =&gt; ) 
    
    in field_sql_storage_field_storage_write() (line 514 of /mysite/modules/field/modules/field_sql_storage/field_sql_storage.module).

Its also give some image related error on recent logs
Unable to generate the derived image located at public://styles/thumbnail/public/imac1.png.
Whenever I trying to upload the image and save the node then it gives the following error.
I have already given the writable permission to files directory and tmp directory.
Any Idea?
You don't have any values for these columns in the SQL query: field_third_section_image_alt, field_third_section_image_title, field_third_section_image_width,
field_third_section_image_height
So there must have something for these fields in order for the query to work. Have a look at the code and see why they are not set.