久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      關(guān)于php mysqli函數(shù)的一些總結(jié)和實例(四)

      前言:php是一門入門比較簡單的編程語言,同時php有非常多的內(nèi)置函數(shù)。所以對于這些內(nèi)置函數(shù)的理解與掌握就顯得尤為重要。接下來我們就分析php的一些內(nèi)置函數(shù)。

      后續(xù)我還會繼續(xù)為大家整理。

      推薦相關(guān)視頻教程:https://www.php.cn/course/list/29/type/4.html

      關(guān)于phpMysqli函數(shù)的理解:

      一、什么是php mysqli?

      php mysqli = php nysqli improved

      mysqli函數(shù)允許您訪問數(shù)據(jù)庫服務(wù)器。

      注意!mysqli擴展用于mysqli4.1.13版本或者更新的版本。

      二、如何使用mysqli函數(shù)?

      如果要使用mysqli函數(shù)則必須在編譯php時添加對mysqli擴展的支持。

      有關(guān)安裝的詳細信息,請訪問:http://www.php.net/manual/en/mysqli.installation.php

      有關(guān)運行配置的詳細信息地址:http://www.php.net/manual/en/mysqli.configuration.php

      三、php相關(guān)函數(shù)介紹

      1、mysqli_debug(message)函數(shù)

      描述:用于執(zhí)行調(diào)試操作,返回true。

      注意;為了使用該函數(shù),您必須編譯mysql客戶端庫來支持調(diào)試。

      2、mysqli_dump_debug_info(link)函數(shù)

      描述:轉(zhuǎn)儲調(diào)試信息到日志中,成功返回true,失敗返回false。

      3、mysqli_error_list()函數(shù)

      描述:返回最近調(diào)用函數(shù)的錯誤列表,每一個錯誤都帶有一個errno、error、sqlstate的關(guān)聯(lián)數(shù)組。

      4、mysqli_state(connection)函數(shù)

      描述:返回當前系統(tǒng)狀態(tài)。

      實例:

      <?php //配置數(shù)據(jù)庫相關(guān)信息 $localhost = 'localhost'; $username = 'zmz'; $password = '20040315'; $dbname = 'zmz'; $port = 3306;  //連接數(shù)據(jù)庫 $conn = mysqli_connect($localhost,$username,$password,$dbname,$port); //檢查連接 if(mysqli_connect_errno($conn)) { die('連接失??!'.mysqli_connect_error()); } //連接成功,返回當前系統(tǒng)狀態(tài) echo '當前系統(tǒng)狀態(tài)'.mysqli_stat($conn); //關(guān)閉連接 mysqli_close($conn); ?>

      5、mysqli_fetch_all(result,resulttype)函數(shù)

      返回類型resulttype:

      MYSQLI_ASSOC

      MYSQLI_NUM

      MYSQLI_BOTH

      描述:從結(jié)果集取出所有行,作為關(guān)聯(lián)數(shù)組或者索引數(shù)組或者二者兼有。

      實例:

      <?php //配置數(shù)據(jù)庫相關(guān)信息 $localhost = 'localhost'; $username = 'zmz'; $password = '20040315'; $dbname = 'zmz'; $port = 3306;  //連接數(shù)據(jù)庫 $conn = mysqli_connect($localhost,$username,$password,$dbname,$port); //檢查連接 if(mysqli_connect_errno($conn)) { die('連接失??!'.mysqli_connect_error()); } //執(zhí)行sql語句 $sql = "SELECT * FROM demo"; $result = mysqli_query($conn, $sql); $rows = mysqli_fetch_all($result); print_r($rows); //釋放結(jié)果集 mysqli_free_result($result); //關(guān)閉連接 mysqli_close($conn); ?>

      以上是本次為大家整理的phpmysqli函數(shù)介紹以及實例,希望可以幫助到大家。謝謝!

      推薦相關(guān)文章:https://www.php.cn/course/list/29/type/4.html

      贊(0)
      分享到: 更多 (0)
      ?
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號