Create a php page of the format as follows:
function do_query($q,$s,$e) {
//connect to database
//run query ($q)
//fetch rows
//store results in variable with a
//seperator ($s) usually a tab and
//fields enclosed by ($e) usually a
//quote
//return result
}
header("Content-disposition: filename=$table.csv");
header("Content-type: application/octetstream");
header("Pragma: no-cache");
header("Expires: 0");
PRINT @do_query($query,"\t","\"");
That should do the trick
-David