i use file_get_contents
to get the queries from the file but now how can i load all of them into a mariadb database by using PDO?
With mysqli i know there is a function called mysqli_multi_query
is there another function that does the same but with PDO?
Asked
Active
Viewed 41 times
0

Andrea
- 134
- 2
- 12
-
1`pdo->exec` will probably not complain when executing multiple queries – apokryfos May 15 '18 at 15:25
1 Answers
0
Do not use multi-query.
Is this a CSV file? If so, you should not need file_get_contents
; instead use LOAD DATA INFILE ...

Rick James
- 135,179
- 13
- 127
- 222