I am trying to use the code seen in this example here:
MySQL load NULL values from CSV data
I am using this code (Which works when I don't use the last three lines)
LOAD DATA LOCAL INFILE 'Myfiles/Products.csv'
INTO TABLE tblProducts
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
(product_id, manufacturer, sku, pname, price, @vstock, @vcategory_id, lf_code)
Set
stock = ifnull(@vstock = ''),
category_id = ifnull(@vcategory_id = '');
However, I keep getting the Error Code 1582: "Incorrect parameter count in the native function call 'ifnull' " Can someone explain what is going wrong?