I want to select all the column names in specific table. then display them.
I searched and get some results like this one.
SELECT `COLUMN_NAME`
FROM `INFORMATION_SCHEMA`.`COLUMNS`
WHERE `TABLE_SCHEMA`='yourdatabasename'
AND `TABLE_NAME`='yourtablename';
if I query this one, how to fetch them and display them ? when I fetch data of any table I display them accourding to their column name.
like:
$table = mysql_query("SELECT * FROM table_name");
while($fetch = mysql_fetch_assoc($table))
{
echo $fetch['id'] . ":" . $fetch['fullname'] . '<br>';
}