Uwe mysql_fetch_array() to get a row into an associative array, or
use mysql_field_name()


--- gert vonck <[EMAIL PROTECTED]> wrote:
> hello everyone,
> 
> this is my code to retrieve info from my mysql db. This works
> perfect, but 
> what i also want is a column before this column. In the first
> column, i want 
> to see the field names from my table. So instead of selecting the
> info of 
> the field names "uitbater","straatnaam",... , I want to get
> "uitbater" 
> itself.
> 
> How can I do this?
> 
> 
> $result = mysql_query("SELECT uitbater, straatnaam, postcode,
> gemeente, 
> provincie, telefoon, fax, email FROM info_general") or die
> (mysql_error());
> $num = mysql_numrows($result);
> 
> print"<table width=200 border=1>\n";
> 
> 
>       while ($get_info = mysql_fetch_row($result))
>       {
> 
>               foreach ($get_info as $field)
>               print "\t<tr><td>$field</td></tr>\n";
> 
> 
>       }
> print "</table>\n";
>       mysql_close();
> 
> 
> 
> 
> _________________________________________________________________
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=====
Mark Weinstock
[EMAIL PROTECTED]
***************************************
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***************************************

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to