Krafty Internet Marketing Forum
i want to allow user to download query data from mySQL server - Printable Version

+- Krafty Internet Marketing Forum (https://kraftymarketingprofits.com/internetmarketingforum)
+-- Forum: Website Design (https://kraftymarketingprofits.com/internetmarketingforum/Forum-website-design--7)
+--- Forum: Website Design Tips & Tricks! (https://kraftymarketingprofits.com/internetmarketingforum/Forum-website-design-tips-tricks--8)
+--- Thread: i want to allow user to download query data from mySQL server (/Thread-i-want-to-allow-user-to-download-query-data-from-mysql-server--1202)



i want to allow user to download query data from mySQL server - meriambellina - 10-12-2016

Hi, I have a non-profit website that I've developed with PHP. I'm trying to make the logged in users can output letters in Word with selected data from a query in MySQL. I've tried to use PHPWord, the letters outputted with no data in the letters. Also I tried used PHP COM, but Hostforlife.EU won't let me restart the server because it is shared. 
Lastly I wrote a SELECT query with INTO OUTFILE '$file' to create a CSV which the users could download and use to merge into Word, but because the database user does not have FILE access, it produces this error:

Error: Access denied for user 'blabla'@'localhost' (using password: YES)

I think Hostforlife.EU will not allow FILE privileges on a shared server. So, how can I get around this. Somehow I want to be able to at least write the query and download the data. Javascript? jQuery? or Something else? Any of you can help me?

Thanks in advance