I’m trying to create a server action to import records quickly, using LOAD DATA LOCAL INFILE. I created a custom query but it won’t run. This is the error message:
I can use a separate PHP file to do this, including this line: PDO::MYSQL_ATTR_LOCAL_INFILE => true
I don’t know if this is all that’s needed, but I imagine there isn’t a way to add options like this. It would be useful if there were.
(This is not exactly a feature request, because it may be that I’m doing something wrong, and in any case, I can use PHP to do this - though of course it would be much more convenient if it could be done within Wappler.)
Server Connect always uses fetchAll, so it should not give this error. If you want to try the PDO option, you can add it in dmxConnectLib/lib/db/Connection.php around line 60.
With the first syntax I used (as you show above), I got the same error message as before. Only when I replaced the => with a comma did it work. I’ve just tried again, using both versions - same result. It seems odd. I commented out the line to check it was needed (I think buffered queries are the default) and I got the same error.