asked in 電腦與網際網路程式設計 · 1 decade ago

fetch_array()問題

fetch_array(MYSQLI_ASSOC)

() 裡面可以放哪些參數and參數意思

我發現沒放 也是可以跑

放了MYSQLI_ASSOC 就不能用$row[0]的方式select出資料

一定要用$row['欄位名稱'] 才能 why?

我用的是mysqli歐

1 Answer

Rating
  • ?
    Lv 4
    1 decade ago
    Favorite Answer

    MYSQLI_ASSOC

    用欄位名稱來取得欄位值

    MYSQLI_NUM

    用索引來取得欄位值

    MYSQLI_BOTH

    包含以上兩項,此為預設值

    Source(s): Myself & www.php.net
Still have questions? Get your answers by asking now.