alternative to mysql_field_name in mysqli

前端 未结 1 1088
慢半拍i
慢半拍i 2021-01-02 14:33

So I found this great function that converts mysql queries into a XML page, and it looks like exactly what I need. The only problem is that it uses mysql, but thats not sup

1条回答
  •  有刺的猬
    2021-01-02 14:52

    There are many ways to do it, I guess the most similar would be:

    $fieldName = mysqli_fetch_field_direct($result, $i)->name;
    

    http://www.php.net/manual/en/mysqli-result.fetch-field-direct.php

    0 讨论(0)
提交回复
热议问题