Import CSV File into MySQL Database

1
14

Image

Suppose there is a csv file named address.csv which contains name,email records we can export this data in to my sql with the statements

Here we are populating the content to Table Address with skipping very first row which contains labels

LOAD DATA INFILE address.csv’ INTO TABLE Address

FIELDS TERMINATED BY ‘,’

ENCLOSED BY ‘”‘

LINES TERMINATED BY ‘\r\n’

IGNORE 1 LINES;

Use phpMySQL to Execute this statement

The same statements can be called from PHP File connected to MySQL for easy content import

SHARE
Previous articleMobile friendly WordPress Themes
Next articleCreate your Free SMS Keyword with txtweb.com
abhilash, is a programmer by profession and a technology addict with a passion towards browsing , shopping and imaging . My views may be biased on reviews. all images and videos are copyrighted to respective owners.

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here