A
A
Andy Bobro2015-07-30 14:02:09
SQL
Andy Bobro, 2015-07-30 14:02:09

How to automatically escape quotes in large (~15mb) SQL files?

The problem is this: you need to upload about 2 million products to the site using sql files containing inserts into different tables. In total, about 30 files are obtained, approximately 15mb each, in which there are lines with unescaped quotes (for example, 'blablabla 'blabla' blabla'), which, of course, causes an error in phpMyAdmin. Online validators hang the browser when trying to paste the contents of files there. What do you advise ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Ivanov, 2015-07-30
@Writerim

write a line-by-line parser and that's it. If the strings are huge, then byte by byte.

S
skynetdev, 2015-07-30
@skynetdev

and include "Magic Quotes" in PHP in any way?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question