How upload data example.txt into database |
[eluser]Unknown[/eluser]
I HAVE DATA EXAMPLE.TXT LIKE THIS BELOW NAME OF DATA IS EXAMPLE.TXT , HOW TO UPLOAD INTO DATABASE MYSQL , THANKS 511456212222 AHMAD 511456212223 FARID 511456212224 FAJAR 511456212225 HAMID 511456212226 FAIZ
[eluser]Dennis Rasmussen[/eluser]
Documentation you need: http://dev.mysql.com/doc/refman/5.1/en/load-data.html 1. Upload TXT file to your webroot 2. Setup your table in your database (make sure it has the same amount of fields as the data in your txt file) 3. Run the following Query: Code: $this->db->query("LOAD DATA INFILE 'example.txt' INTO TABLE table_name FIELDS TERMINATED BY ' '"); |
Welcome Guest, Not a member yet? Register Sign In |