db to csv - solved |
[eluser]Near[/eluser]
hi its me again.. someone please help me generate a downloadable csv file from a query i tried Code: $this->load->dbutil(); that i found at the user manual but it only echoes the query result at the browser and did not generate csv files. thanks
[eluser]Mirge[/eluser]
[quote author="Mbet" date="1313147187"]hi its me again.. someone please help me generate a downloadable csv file from a query i tried Code: $this->load->dbutil(); that i found at the user manual but it only echoes the query result at the browser and did not generate csv files. thanks[/quote] Untested. Code: $outputFile = 'myfile.csv';
[eluser]Near[/eluser]
hi i use the file helper. that takes care of the writing in the file. my new code looks likes this Code: function getcsv() { is there any way to tell the browser that i was generating a file and ask the user if he wants to download it?
[eluser]Mirge[/eluser]
http://stackoverflow.com/questions/14655...-using-php
[eluser]Near[/eluser]
thanks the browser do a force download on that file but the file that is downloaded is empty
[eluser]Near[/eluser]
[quote author="Mbet" date="1313150235"]thanks the browser do a force download on that file but the file that is downloaded is empty[/quote] never mind this post.. here my code. Code: function getcsv() {
|
Welcome Guest, Not a member yet? Register Sign In |