alternative to mysql_field_name()

From: Date: Tue, 21 Sep 2004 21:01:02 +0000
Subject: alternative to mysql_field_name()
Groups: php.general 
Request: Send a blank email to php-general+get-197485@lists.php.net to get a copy of this message
hi there, i am currently using the following code to loop through the results of a sql query and extract the field names ($export contains the query results from the database). the script goes on to place the results in an excel file. for ($i = 0; $i < $fields; $i++) { $header .= mysql_field_name($export, $i) . "\t"; } however, i'd like to add more meaningful names as the field name headings in the excel file. can anyone suggest how i can write a list of tab separated headings into $header? the rest of the script can be found here: http://www.phpfreaks.com/tutorials/114/3.php many thanks, luke. ----------------------------------------------- need a new website? get over to http://www.lukem-sites.co.uk

« previous php.general (#197485) next »