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

  • SEARCH
  • Home
  • 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 8140585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:12:40+00:00 2026-06-06T12:12:40+00:00

I’m trying to import a text file into a MySQL database, and I’m having

  • 0

I’m trying to import a text file into a MySQL database, and I’m having trouble getting the first field (card_no) to populate completely in all of my records. After I import the file (which does not produce any errors), the first record shows up correctly but the other records do not. Can anyone tell me how I can remedy this? — And in case it matters, I was using phpMyAdmin to load the file. — Thanks for your time.

Here’s the structure of the database:

Field       Type            Collation         Attributes    Null    
card_no     smallint(6)                       Yes           NULL
name        varchar(100)    latin1_swedish_ci No    
artist      varchar(30)     latin1_swedish_ci Yes           NULL
color       varchar(25)     latin1_swedish_ci Yes           NULL
rarity      varchar(1)      latin1_swedish_ci Yes           NULL
expansion   varchar(50)     latin1_swedish_ci Yes           NULL

Here’s the code:

    LOAD DATA LOCAL INFILE 'C:\\xampp\\tmp\\php43.tmp'
    INTO TABLE `mtginfo` FIELDS TERMINATED BY ';'
    ENCLOSED BY '"' ESCAPED BY '\\' LINES TERMINATED BY ',';

Here’s the imported file:

    "1";"Ajani Goldmane";"Aleksi Briclot";"White";"M";"Magic 2010",
    "2";"Angel's Mercy";"Andrew Robinson";"White";"C";"Magic 2010",
    "3";"Armored Ascension";"Jesper Ejsing";"White";"U";"Magic 2010",
    "4";"Baneslayer Angel";"Greg Staples";"White";"M";"Magic 2010",
    "5";"Blinding Mage";"Eric Deschamps";"White";"C";"Magic 2010"

Here’s a sample of the output:

    card_no name            artist          color   rarity  expansion
    1       Ajani Goldmane  Aleksi Briclot  White   M       Magic 2010
    0       Angel's Mercy   Andrew Robinson White   C       Magic 2010
    0       Armored Ascensi Jesper Ejsing   White   U       Magic 2010
    0       Baneslayer Ange Greg Staples    White   M       Magic 2010
    0       Blinding Mage   Eric Deschamps  White   C       Magic 2010
  • 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-06T12:12:41+00:00Added an answer on June 6, 2026 at 12:12 pm

    I’m not sure what the protocol is for answering your own question, so in case anyone else has this issue I’ll post the solution I just discovered. — I have the CARD_NO field type as smallint, and I’m trying to load a non-integer type into it. Hence the import does not load the char type (char because of the quotes), and it moves to the next field. — Thanks again for the answer Devart. While your response didn’t correct my issue, it did get me to think about my problem so more.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a reasonable size flat file database of text documents mostly saved in
I am trying to render a haml file in a javascript response like so:
We're building an app, our first using Rails 3, and we're having to build
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

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.