Web Global Net Web Application & Web Development Project Center

Technical Issues => MySQL => Topic started by: admin on July 06, 2008, 01:12: PM



Title: Incorrect Column Count for CVS import
Post by: admin on July 06, 2008, 01:12: PM
Something to look for when getting an incorrect sql column count error during import.

Take a look at the data you're trying to import if you are getting this error chances are somewhere in your data you will find quotes ("") surrounding text data assuming you have chosen the option of field data enclosed in "" (for phpmyadmin) .

This will cause the sql execution to think that there is a field and throw off the column count you have set up in your cvs data - remove the "" around any text and you should be ok

This can also be caused by not including a record_id # column (assuming you have a DB column with autonomies generated, unique ID) in this case when you do the import create a column for the ID # in the excel spreadsheet and if the ID is created automatically then just copy NULL to all records for the ID column.