heh. I went back and re-thought out my logic. I came to this conclusion and used a different function. The end results do exactly what I want it to. Here's what I did for all that want to know:
<?
$link = mysql_connect('localhost', 'user', 'pass');
$res = mysql_db_query("db", "select * from table", $link);
$csv = fopen("/path/to/file.csv", "w");
$fieldname = mysql_field_name($res, 1);
$fieldname2 = mysql_field_name($res, 2);
$fieldname3 = mysql_field_name($res, 8);
fwrite($csv,"$fieldname,$fieldname2,$fieldname3,");
fclose($csv);
?>
This code writes out the second, third and seventh field of the table to a CSV file for later exportation.