Google Cloud SQL
restricts use of LOAD DATA INFILE
in SQL statements.
I'm trying to make a feature that would allow users to batch upload user data to my web app so they don't have to make each entry one by one.
How would I go about accomplishing this within the restrictions of GAE PHP
and Cloud SQL
?
Update: Users of my app are able to manage a list of students. I want my users to be able to submit a CSV file and have that input into their student database. I can't use sync or MySQL workbench, etc. It has to be done within the web app.
Thanks for your input!
I too was recently looking for a way for power users to bulk upload. My first successful attempt was variable specific so check my mapping. This trial was completed without a frontend so you'll need to build a form for users to upload to your bucket. My answer assumes familiarity with Google Storage.
In my trial, rows with special characters (single and double quotes and hyphens, that I can recall) did not import so pay attention to your row_count().
The only way I think you can do this is by creating a PHP script to read the file and insert it into the Database using SQL
INSERT
statements, the normal way by which you would insert data into a cloudSQL instance.