How to solve the problem of table name error with MD5 value in Mysql This article summarizes notes about uncommon errors. Irregular updates
1. problem of table name error caused by MD5 value in Mysql and solution
When writing a crawler, you need to use MD5 as the table name, but some of them will report errors, but others will work well! For example, 978ea04f9bdadd36d1f919520f20ac47 can work normally while 8e6a968cdadefeeae6c25e050080e537 cannot! Why?
Because MD5 contains XeX characters, such as 1e or 2e2, the expressions similar to 1e + 1 are fuzzy. According to the context, it can be interpreted as the expression 1e + 1 or the number 1e + 1. Therefore, use MD5 to generate a table name, because it may generate an invalid table name, as described above.
Original article: click to open the link
Solution:
1. since the root cause of the problem lies in the character e, you can replace all the characters e with str. replace ("e", "new;
2. use the Mysql identifier "", the key on the right of keyboard 1.
This article by @ The_Third_Wave (Blog address: http://blog.csdn.net/zhanh1218) original. Update from time to time. if any error occurs, please correct it.
If you find that this Blog post is incomplete, it is the reason for me to prevent crawlers from releasing half of the posts first. please refer to the original author's Blog.
If this blog post is helpful to you, you are not recommended to repost it for a good network environment. we recommend that you add it to your favorites! If you must reprint the content, please include the suffix and the address of this article.