GIDForums  

Go Back   GIDForums > Webmaster Forums > Web Design Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 08-Mar-2004, 15:16
Kurtanator Kurtanator is offline
New Member
 
Join Date: Feb 2004
Posts: 5
Kurtanator is on a distinguished road

grabbing column names


hi, 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  
Old 08-Mar-2004, 15:24
Kurtanator Kurtanator is offline
New Member
 
Join Date: Feb 2004
Posts: 5
Kurtanator is on a distinguished road
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 GIDBlogToyota - 2008 July Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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

All times are GMT -6. The time now is 23:57.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.