Hi friends...

I have query regarding inserting data into database...
I want approx 2000 product to be insert in the MYSQL table which i can create manually by creating each time with a new node..but it will be time consuming.If anybody have easy solution for this then please let me know.

Comments

cog.rusty’s picture

Shouldn't you explain what products and what table?

It could be as simple as filling an Excel sheet, saving to CSV and running an SQL query. Or it could be much more difficult.

Piya’s picture

I have product list in csv format..
i am not getting how to write SQL query and where i can write it..
Can u explain me that it in detail ...

cog.rusty’s picture

The easiest way to import a CSV file is to use phpmyadmin, go to the table where you want to import the data and then select the "Import" tab. There will be an option for CSV files.

A little harder is to use phpmyadmin, select the "SQL" tab and use the LOAD DATA INFILE statement (http://dev.mysql.com/doc/refman/5.0/en/load-data.html) with the right syntax.

If you have shell access, you can also use the command line program mysqlimport (http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html)

Piya’s picture

Hay thnks...
I have done that but the problem is that file size for CSV is too big...
so is any other alternative..???
or if any way i can manage that csv file???

cog.rusty’s picture

Cut it in parts with fewer lines each.

Piya’s picture

Hey thanks I have done with it... :)