June 7, 200917 yr Hi all I have over 1500 items that need inserting into a databace rather than data entry i have manged to get hold of an xml file and a csv file of all the products could you please tell me the best way to go about this do i need to change all the fields in the csv file to match my fields in the databace aswell has add the fileds that are in the databace to the csv or is there a step by step tutorial for this thank you UPDATE i now have a php script to insert the csv file that gave me a few errors but i have fixed all but one Column count doesn't match value count at row 1 i have googled for the answer but dont find an answer that makes sence can any one help thanks
June 7, 200917 yr The error message you're getting is because your csv file doesn't contain the correct number of values on the first line for the table you're importing into. If your table has 5 columns, each line of the csv file must contain 5 values separated by a comma. If the csv file contains a different number of values, you can open it in Excel or Open Office Calc and add or delete columns as required, and if necessary change the order of the columns to match the order of the columns in the table. One other quick point, if you use PHPMyAdmin, you can import cvs files through that interface.
June 7, 200917 yr Author The error message you're getting is because your csv file doesn't contain the correct number of values on the first line for the table you're importing into. If your table has 5 columns, each line of the csv file must contain 5 values separated by a comma. If the csv file contains a different number of values, you can open it in Excel or Open Office Calc and add or delete columns as required, and if necessary change the order of the columns to match the order of the columns in the table. One other quick point, if you use PHPMyAdmin, you can import cvs files through that interface. Hello thanks for this i realised 5 mins after posting and i have 63 colums in the databace and 62 in the csv thank you
Create an account or sign in to comment