I am struggling with a bit of code.... essentially, I have a bunch of .csv product feeds that all may have a different number of columns... so essentially I implode the entire csv file and am then attempting to only insert records for a set number of them. I have looked and looked and the code looks right, but I keep getting the following error:
#1064 - 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,Currency,Language,ShipFrom,Keywords,SubCategory ) SET MerchantID = @me' at line 1
MySQL version = MySQL - 5.0.45
The echo of the query is as follows:
LOAD DATA LOCAL INFILE '/var/www/vhosts/domain.com/httpdocs/productfeeds/xxxxxx-pfo-020491-01of01.csv' INTO TABLE as_feeds_products_sets_misc FIELDS TERMINATED BY '|' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 LINES (
@ProductID , Categories, Title, Description, Price, URL, ThumbURL, ImageURL, Retail, InStock, ShippingWeight, UPC, Brand, Manufacturer, ManufacturerID, Classification, Condition, Currency, Language, ShipFrom, Keywords, SubCategory
) SET MerchantID = @merchantId ,
ProductID = @ProductID ,
Title = @Title ,
Description = @Description ,
TrackingURL = @URL ,
ImageURL = @ImageURL ,
Price = @Price ,
Keywords = @Keywords ;
Any thoughts would be appreciated as this is driving me nuts!!!
Thanks,
Ryan