Excel Import Database data loss problem (good time bad)

Source: Internet
Author: User
Tags php tutorial import database
Recently in the development of Excel import resume (Excel file) feature, in the import of Excel often appear in the data inserted into the database is not complete (only part of the data), so before inserting the data obtained in the Excel table,

A rich Text object (composed of unformatted text, control words, control symbols, such as fonts in Excel, Arial, italic, and so on) is printed, which is the root cause of the insertion failure.

Workaround: Type cast to String

Before the change:


After the change:

Problem solved,,, is so simple, hope can help the troubled you!

The above describes the Excel import database data loss problem (good and bad), including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.