Import CSV requires a certain field

Hello,

There's something I don't understand with the CSV Import plugin...

I am only able to import listings if I include a column for a field called "condition". Could someone please explain why this may be?

If I don't include the "condition" field then when I try and import I see error messages for every listing and the import won't complete. However, by simply specifying a column in the CSV file for the "condition" field the import works fine.

Is "condition" a reserved word....? Now I think about it I think that may have caused issues somewhere else in my code so perhaps it's a similar issue.

Any insight that can be provided would be very appreciated.

Regards,

Greg

Hi Jason,

Your understanding is correct; when I include the filed the import works fine and if I exclude it then the import fails.

My "condition" field is a dropdown menu field with several options such as:

  • Excellent
  • Good
  • Fair/Working

These options are just setup using the "Set options below" list.

If I exclude the "condition" field then the error message is as follows:

Import Row #1 - MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'condition = DEFAULT , warranty = DEFAULT , description = DEFAULT , paid_until = ' at line 17
SET `product` = 'product name',
`status` = 'visible',
`list_price` = '100,000.00',
`manufacturer` = 'company_name'

Maybe the "condition" field can not be set to DEFAULT?

Thanks for your help with this.

Regards,

Greg

By Jason - September 19, 2013

Hi Greg,

Okay, I see.  If you could send in a second level support request (https://www.interactivetools.com/support/email_support_form.php?priority=free), I can take a closer look and find out what's happening.

Thanks,

---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/