Firstly, looking at your importVIP.csv it uses a tab delimiter and not comma.
Your file shows: Id EntityTypeId LastUpdateTime SearchString CustomData Notes AccountId WarehouseId Name
it should be Id,EntityTypeId,LastUpdateTime,SearchString,CustomData,Notes,AccountId,WarehouseId,Name
(I have omitted the “500
” at the start of your sample data line as it relates to the auto-increment column)
The other issue arise from the JSON array. With a comma delimiter
1,2020-07-10 18:36:40.637,NULL,[{"Name":"Street","Value":"1 Any St"},{"Name":"Suburb","Value":"St Marys"},{"Name":"Phone","Value":"021234567"},{"Name":"Postcode","Value":"1111"}],NULL,0,0,John Smith
is read as these columns:
1
2020-07-10 18:36:40.637
NULL
[{"Name":"Street"
"Value":"1 Any St"}
{"Name":"Suburb"
"Value":"St Marys"}
{"Name":"Phone"
"Value":"021234567"}
{"Name":"Postcode"
"Value":"111"}]
NULL
0
0
John Smith
15 columns - I think here is where your error came from earlier.
When you export, if you can change the delimiter from ‘,’ to ‘~’ this will yield the following:
1~2020-07-10 18:36:40.637~NULL~[{"Name":"Street","Value":"1 Any St"},{"Name":"Suburb","Value":"St Marys"},{"Name":"Phone","Value":"021234567"},{"Name":"Postcode","Value":"1111"}]~NULL~0~0~John Smith
When you load the CSV in PHP you should be able to specify the delimiter. If you specify ‘~’ you’ll be left with this:
1
2020-07-10 18:36:40.637
NULL
[{"Name":"Street","Value":"1 Any St"},{"Name":"Suburb","Value":"St Marys"},{"Name":"Phone","Value":"021234567"},{"Name":"Postcode","Value":"1111"}]
NULL
0
0
John Smith
now this corresponds to 8 columns (EntityTypeID, LastUpdateTime, SearchString, CustomData, Notes, AccountID, WarehouseID, Name
)