Welcome Guest, Not a member yet? Register   Sign In
Insert 1 milion record

if using post, you can using form validation with is_unique.

(11-07-2017, 08:42 AM)omid_student Wrote:
(09-29-2017, 02:17 PM)ciadvantage Wrote:
(09-29-2017, 01:31 PM)omid_student Wrote:
(09-29-2017, 01:25 PM)ciadvantage Wrote: Well if ID is primary key then it should be auto-incremented as you set it, so it is taken care off already.  Your example is like
ID isnt.  I would have it as primary key then problem is solved

Ok for insert ID,my problem solved.
Now how do i insert many record?(about 1 million)

you can do from code level but it is not recommended.  I found it is easier just use this


ie. using command from mysql > LOAD DATA INFILE 'users.txt' INTO TABLE yourdb.users;

/* Assume you have db name as yourdb and table users, your users.txt should be comma seperated */

Try a simple test file with few names to see how it goes then you can go from there.

Hey i cannot access to command line mysql
How do it?

The best way is using MySQL Tools like MySQL Workbench, Navicat, SQLyog to do the Import / Export.

I second the use of mysql's load data infile. I worked on a project once where they with dealing with millions of rows of data reqularly, with data normalization, etc. We handled that by using load data to load the CSV to a temporary table at which point we could removed duplicates, normalize, etc. before merging into the rest of the working data. Worked pretty well.

Theme © iAndrew 2016 - Forum software by © MyBB