Hi, 

I use an external mysql database in my application and use the 
executesql(str(query), as_dict=True)) to run queries on it.
I want to have a download link for a csv files of different queries in my 
application. If I were to work locally I would have used the following 
mysql command:

'SELECT * FROM SOME_TABLE INTO OUTFILE '/tmp/test1.csv' FIELDS TERMINATED 
BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n''

In my application a user can select certain criteria, a query is built in 
the controller according to the criteria and is executed with the 
executesql() method
which returns a dictionary like object. 

My question is: is there a way to make a download link in the view to 
download a csv file of results returned by the executesql() method?

Thank you!
Adam

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to