![]() |
|
#1
|
|||
|
|||
grabbing column nameshi, i had good luck the first time so i thought i'd try again,
i'm trying to grab the column names from a mysql table named grades. i know in the mysql monitor, i can type "explain grades;" and that brings up a list. can i do the same from php in order to fetch the row with field names? any help is appreciated, KurtM |
|
#2
|
|||
|
|||
|
i wanted to add that i had luck with the following code but didn't know if this would get me in trouble down the line using a simple increment:
(btw, using abstracted c++) $get_columns=$new_db->query("explain grades"); while($row=$new_db->fetch_row($get_columns)) { $i=0; $column_name=$row[$i]; $display_columns .="$column_name<br>"; $i++; } |
Recent GIDBlog
Toyota - 2008 July Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Two column list, newbiequiz again. | giobbi | MySQL / PHP Forum | 1 | 27-Feb-2004 03:57 |
| 3 column CSS layout for desilva.biz! | JdS | Learning Journal by J de Silva | 5 | 03-Jul-2003 18:09 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The