0

how do I display mysql "field" column only on my website using PHP and SQL? I don't want to show other data except the "field" column in a table.

Because I trying to do adding,editing and deleting of the "field" through my own website admin portal instead of login to phpmyadmin to do it. Appreciate if have advice on this too.

Thanks[please refer to the picture below for easier understand what I'm asking]

https://i.stack.imgur.com/WVGQl.png

1 Answers1

0

Your query should be this:

SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '<database_name>' AND TABLE_NAME = '<table_name>';
Indrasis Datta
  • 8,692
  • 2
  • 14
  • 32