If all queries end with ;
I can explode by this char, but what should I do when a ;
appears in a field?
e.g.
[...]Select * From my_data where idk=';';\nSelect [...]
or
[...]Select * From my_data where idk=';\n';Select [...]
My file consists of all kinds of queries, including INSERT
s and can have syntax variations like the ones shown above where a ;
is followed by a new line sometimes inside a field.
How can deal with this problem?
PHP functions like explode
will fail, would eregi
or preg_match
work?