Re: mysql_field_name

From: Date: Sun, 24 Feb 2008 13:59:33 +0000
Subject: Re: mysql_field_name
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-269992@lists.php.net to get a copy of this message
At 8:16 PM -0300 2/23/08, Emiliano Boragina wrote:
I want to see all fields name of the DB and only in one TR… how can I do that (in code please)?
$result = mysql_query($query) or die(report($query,__LINE__ ,__FILE__)); $columns = mysql_num_fields($result); for($i = 0; $i <= $columns; $i++) { echo("<th> mysql_field_name($result, $i)</th>"); } This works for me -- however, it could be improved. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#269992) next »