0

I have a MySQL database which contains a text field which contains well formed xml. I want to export this data as an xml file named result_new.xml on the fly. I have made the tmp folder and have set the permissions on the folder to 0777. If I run this snippet in a php file with proper access to the database and correct values in the variables, I can echo the field's content correctly, but when I use the following to create a xml file, nothing happens. I cannot find the new file in the tmp folder. Can someone give me some help here?

"SELECT Result INTO OUTFILE '/tmp/result_new.xml' FROM safetyte_stol.quiz WHERE managerId = '$managerId' AND userIdRec = '$userIdRec' AND quizTitle = '$quizTitle'";

I

2
Contributors
3
Replies
12
Views
1 Year
Discussion Span
Last Post by facarroll
1

Your SQL looks right so there must be so external factor happening, some form of permissions being the ikely problem (yes, I now you said the directory was 777). Are you checking the MySql error after you've ran the query?

0

Do you mean MySql error logs? If so, I've never understood how to do this. (I'm using a WAMP testing server).

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.