MySQL database table to HTML table

后端 未结 2 588
一生所求
一生所求 2021-01-28 06:17

Here the value of $table will be passed from another file and it will be a table name in a database.

With that table name ($table) am trying to fetch its column names an

2条回答
  •  醉话见心
    2021-01-28 07:15

    Yes only columns will be printing because you are printing $rs[0];?> where $rs holds object for mysql_query qq and it holds your column query only not

    "select * from $table"
    

    this.

    Why dont you try displaying columns as a single row in html table and then try displaying data from other php set with seperate query structure . Hope this way it helps.

提交回复
热议问题