I have written a small (2line) query. I want to create link on my php site which on click will run this script automatically and export results to an excel or csv file. I dont want to create a page to view the results.
Any help to me will be very useful. I am not well conversed with PHP just know a little bit of mysql.
You can use the PHP fputcsv() function to generate CSV files from array. The array can be created via mysql_query() and mysql_fetch_assoc() functions. If you need more help, let me know.