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

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?

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

I took a different approach. Discontinued this discussion.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.