MySql SELECT AS - Append all field names

前端 未结 4 1669
傲寒
傲寒 2021-01-17 11:32

I\'d like to do something like this:

SELECT table.id AS prefix_id, table.name AS prefix_name

... and have the prefix added dynamically to a

4条回答
  •  时光取名叫无心
    2021-01-17 12:12

    In mysqli you can use the php function

    mysqli_fetch_fields()

    for fieldinformations - so you get the tablename of each collumn

提交回复
热议问题