Paip. How to resolve the problem of importing data into mysql

Source: Internet
Author: User
Tags mysql import

Paip. How to resolve the problem of importing data into mysql

# --- Cause: mysql import tool bug

# --- Solution: Double quotation marks are not included in the phonetic alphabet.

Author old wow's paw Attilax iron, EMAIL: 1466519819@qq.com
Reprinted please indicate Source: http://blog.csdn.net/attilax

From log import *
IniLog (r "c: \ enWzPhonetic. log ")
N = 0
For line in lines:
If (n> 100000): break;
If (not isContain (line, "["): continue;
Word = left_ByFirstChar (line, r "[")
Word = trim (word)
Logging.info ("start to word:" + word)
Phonetic = subStrNtrim (line, r "[", r "]")
Phonetic = replace_multiple (phonetic, splitor, spltrFinal)
Phonetic = trim_multi (phonetic ,"@")



Logging.info (word + "--- \" "+ phonetic + "\"")
# Todox import mysql5.6 empty, in phntc, so. must include use doubleQuot
Line = word + "\ t \" "+ phonetic + "\""
FileHandle. write (line + "\ n ")
N = n + 1
# Endfor
Print ("ah? B? 'Rei ?? N ")
FileHandle. close ()

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.