久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

        <bdo id='9eNio'></bdo><ul id='9eNio'></ul>

    1. <tfoot id='9eNio'></tfoot>

      <small id='9eNio'></small><noframes id='9eNio'>

      <legend id='9eNio'><style id='9eNio'><dir id='9eNio'><q id='9eNio'></q></dir></style></legend>
      <i id='9eNio'><tr id='9eNio'><dt id='9eNio'><q id='9eNio'><span id='9eNio'><b id='9eNio'><form id='9eNio'><ins id='9eNio'></ins><ul id='9eNio'></ul><sub id='9eNio'></sub></form><legend id='9eNio'></legend><bdo id='9eNio'><pre id='9eNio'><center id='9eNio'></center></pre></bdo></b><th id='9eNio'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='9eNio'><tfoot id='9eNio'></tfoot><dl id='9eNio'><fieldset id='9eNio'></fieldset></dl></div>
    2. mysqli 中 mysql_field_name 的替代方案

      alternative to mysql_field_name in mysqli(mysqli 中 mysql_field_name 的替代方案)
      <i id='Fnt9T'><tr id='Fnt9T'><dt id='Fnt9T'><q id='Fnt9T'><span id='Fnt9T'><b id='Fnt9T'><form id='Fnt9T'><ins id='Fnt9T'></ins><ul id='Fnt9T'></ul><sub id='Fnt9T'></sub></form><legend id='Fnt9T'></legend><bdo id='Fnt9T'><pre id='Fnt9T'><center id='Fnt9T'></center></pre></bdo></b><th id='Fnt9T'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Fnt9T'><tfoot id='Fnt9T'></tfoot><dl id='Fnt9T'><fieldset id='Fnt9T'></fieldset></dl></div>
        • <bdo id='Fnt9T'></bdo><ul id='Fnt9T'></ul>

            <tbody id='Fnt9T'></tbody>
            <legend id='Fnt9T'><style id='Fnt9T'><dir id='Fnt9T'><q id='Fnt9T'></q></dir></style></legend>

            <small id='Fnt9T'></small><noframes id='Fnt9T'>

          • <tfoot id='Fnt9T'></tfoot>

              • 本文介紹了mysqli 中 mysql_field_name 的替代方案的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

                問(wèn)題描述

                所以我發(fā)現(xiàn)了這個(gè)將mysql查詢轉(zhuǎn)換為XML頁(yè)面的很棒的函數(shù),它看起來(lái)正是我需要的.唯一的問(wèn)題是它使用了 mysql,但不再受支持,而且結(jié)果使用的函數(shù)之一不在 mysqli 中.有誰(shuí)知道 mysql_field_name 的替代方法?

                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 supported anymore, and it turns out one of the functions used isn't in mysqli. Does anyone know of an alternative to mysql_field_name?

                這是我找到的函數(shù)

                function sqlToXml($queryResult, $rootElementName, $childElementName)
                { 
                $xmlData = "<?xml version="1.0" encoding="ISO-8859-1" ?>
                "; 
                $xmlData .= "<" . $rootElementName . ">";
                
                while($record = mysql_fetch_object($queryResult))
                { 
                    /* Create the first child element */
                    $xmlData .= "<" . $childElementName . ">";
                
                    for ($i = 0; $i < mysql_num_fields($queryResult); $i++)
                    { 
                        $fieldName = mysql_field_name($queryResult, $i); 
                
                        /* The child will take the name of the table column */
                        $xmlData .= "<" . $fieldName . ">";
                
                        /* We set empty columns with NULL, or you could set 
                            it to '0' or a blank. */
                        if(!empty($record->$fieldName))
                            $xmlData .= $record->$fieldName; 
                        else
                            $xmlData .= "null"; 
                
                        $xmlData .= "</" . $fieldName . ">"; 
                    } 
                    $xmlData .= "</" . $childElementName . ">"; 
                } 
                $xmlData .= "</" . $rootElementName . ">"; 
                
                return $xmlData; 
                }
                

                有問(wèn)題的部分是

                $fieldName = mysql_field_name($queryResult, $i);
                

                謝謝

                邁克

                推薦答案

                有很多方法可以做到,我猜最相似的是:

                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/手冊(cè)/en/mysqli-result.fetch-field-direct.php

                這篇關(guān)于mysqli 中 mysql_field_name 的替代方案的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動(dòng)游標(biāo)不起作用)
                PHP PDO ODBC connection(PHP PDO ODBC 連接)
                Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術(shù)方法)
                php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個(gè)值;等于變量的值)
                MSSQL PDO could not find driver(MSSQL PDO 找不到驅(qū)動(dòng)程序)
                <i id='xqGJD'><tr id='xqGJD'><dt id='xqGJD'><q id='xqGJD'><span id='xqGJD'><b id='xqGJD'><form id='xqGJD'><ins id='xqGJD'></ins><ul id='xqGJD'></ul><sub id='xqGJD'></sub></form><legend id='xqGJD'></legend><bdo id='xqGJD'><pre id='xqGJD'><center id='xqGJD'></center></pre></bdo></b><th id='xqGJD'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='xqGJD'><tfoot id='xqGJD'></tfoot><dl id='xqGJD'><fieldset id='xqGJD'></fieldset></dl></div>

                <tfoot id='xqGJD'></tfoot>
                  <bdo id='xqGJD'></bdo><ul id='xqGJD'></ul>

                      <tbody id='xqGJD'></tbody>

                      <legend id='xqGJD'><style id='xqGJD'><dir id='xqGJD'><q id='xqGJD'></q></dir></style></legend>

                        <small id='xqGJD'></small><noframes id='xqGJD'>

                        1. 主站蜘蛛池模板: 美日韩中文字幕 | 久久9视频 | 99免费视频| 日韩精品成人 | 欧美日韩在线视频一区二区 | 久久精品国产久精国产 | 国外成人在线视频网站 | 五月婷婷激情 | 国产精品3区 | 91欧美| 欧美激情一区二区三区 | 国产精品精品 | 久久成人综合 | 国产精品视频一二三区 | 久久久久网站 | 国产视频线观看永久免费 | 青青久久av北条麻妃海外网 | 黄色91在线| 成人性视频在线播放 | 超碰最新在线 | 中文字幕第九页 | 97精品一区二区 | 91欧美精品 | 日韩一区二区在线视频 | 91精品国产综合久久小仙女图片 | 国产一二区视频 | 久久久久久久综合色一本 | 国产成人免费在线观看 | 91免费在线播放 | 国产九九九九 | 免费a网站| 久在线视频播放免费视频 | 精品日本中文字幕 | 亚洲国产精品久久久久久 | 中文字幕乱码一区二区三区 | 91av入口| 国产在线www | 五月综合激情婷婷 | 五月天天丁香婷婷在线中 | 亚洲欧美精品在线 | 欧美中文字幕一区二区三区亚洲 |