- Joined
- Sep 29, 2004
- Messages
- 1,417
- Reaction score
- 29
I am offering 1000 DNF$ to anyone who can help me solve this!
I bought a 300 Mb database, 60K+ records, in the form of a large flattext .sql file, but when I came to import it, many of the records contain un-escaped quotes (') which messes up the SQL INSERT queries:
I bought a 300 Mb database, 60K+ records, in the form of a large flattext .sql file, but when I came to import it, many of the records contain un-escaped quotes (') which messes up the SQL INSERT queries:
Obviously, it's not just a case of escaping every quote in the file, because the quotes between the record's fields are necessary:INSERT INTO `articles` VALUES ('','Planning Your Wedding Is Easy','<p>Planning a wedding is one of the most nerve wracking times in any person's life...','Marriage-Wedding','Active');
... so what do I do? You can't escape them by hand because there's 60,000+ records, so how do I get them into a database?INSERT INTO `articles` VALUES ('','Planning Your Wedding Is Easy','<p>Planning a wedding is one of the most nerve wracking times in any person\'s life...','Marriage-Wedding','Active');