Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7874831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:52:44+00:00 2026-06-03T02:52:44+00:00

Hi I am trying to be at point. I am trying to upload CSV

  • 0

Hi I am trying to be at point.

I am trying to upload CSV into mysql atonce by using php in windows. so I am using the query

LOAD DATA INFILE 'c:/Data/mysql/transaction_upload.csv'
INTO TABLE transaction_upload
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\\'
LINES TERMINATED BY '\r\n';

it load my whole csv into the table.

The problem is:

  1. The condition is that the table “transaction_upload” should be already exist.
  2. It upload first row of csv too which contain header.

I want that first row will removed from CSV i.e. the header should not be have entry in DB and the table created automatically having name as CSV_file_name and columns as CSV first row’s columns.

Please do not answer as read first line of CSV in php and create table because the problem of removing first row from is still there.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T02:52:45+00:00Added an answer on June 3, 2026 at 2:52 am

    Add IGNORE 1 LINES to the end of your LOAD DATA command.

    As the manual says:

    The IGNOREnumberLINES option can be used to ignore lines at the start of the file. For example, you can use IGNORE 1 LINES to skip over an initial header line containing column names:

    LOAD DATA INFILE '/tmp/test.txt' INTO TABLE test IGNORE 1 LINES;

    If the table does not already exist, MySQL will raise an error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to upload a video to YouTube using the PHP Data API $yt
I would like to upload a file into share point using FORM POST. I
Hi everyone Im trying to post some data to a php script using AppMancer
I am trying to give float point into core-plot y axis value, it is
I'm trying to convert a single precision floating point number into an ascii representation
I recently upgraded to Flash Builder 4.5 for PHP and am trying to upload
I'm trying to upload documents to SharePoint using web services attaching custom metadata to
i'm trying to upload some data from an ActiveX control to a webpage. The
I am trying to upload video from the iPhone application using FBConnect. Actually I
I'm relatively new to PHP/mySQL and I'm trying to develop a portfolio of my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.