I wasn't sure if I should post this here or the newbie section.
How do you query a list of mysql table field names? Not the values, just the names? Thanks.
do a DESCRIBE query
I know how to use describe from the mysql command line, how do you use it in PHP? Sorry if I wasn't specific enough.
msound wrote:I know how to use describe from the mysql command line, how do you use it in PHP?
I know how to use describe from the mysql command line, how do you use it in PHP?
the same way that you execute any other type of query: [man]mysql_query[/man]
Thanks I got it:
$Query = "DESCRIBE $TableName"; $Result = mysql_db_query ($DBName, $Query, $Link); while ($Row = mysql_fetch_array ($Result)) { echo $Row[0] . '<br>'; }