i think this is mysql question.correc t me if its java!
I am using play framework (mvc java for web app).
my question is that i want to save data from (.txt) file to mysql. So i got upload.html :
and for the action i got
......
QUERY= "LOAD DATA INFILE '"+filename+ "' INTO TABLE mytAble;";
......
which doesnt work.if i do
query = "LOAD DATA INFILE 'c://myfile.txt' INTO TABLE mytAble;";
works fine(puts the data of myfile to mysql table)
what can i do ? any help appricieted !!
I am using play framework (mvc java for web app).
my question is that i want to save data from (.txt) file to mysql. So i got upload.html :
Code:
<form action="mplapla" method="POST" enctype="multipart/form-data">
<input type="file" name="filename" />
<input type="submit" value="upload file"/>
</form>
......
QUERY= "LOAD DATA INFILE '"+filename+ "' INTO TABLE mytAble;";
......
which doesnt work.if i do
query = "LOAD DATA INFILE 'c://myfile.txt' INTO TABLE mytAble;";
works fine(puts the data of myfile to mysql table)
what can i do ? any help appricieted !!
Comment