查詢語句後面加MYSQL ASSOC是什麼意思技術問答

時間 2021-10-14 22:24:01

1樓:匿名使用者

$result_type = mysql_assoc這個返回的陣列是以資料表中的欄位為鍵的而mysql_num是以數字為鍵的

2樓:匿名使用者

返回記錄集型別為 關聯陣列array mysql_fetch_array ( resource $result [, int $ result_type ] )有一點很重要必須指出,用 mysql_fetch_array() 並 比用 mysql_fetch_row()慢,而且還提供了明顯更多的值。 mysql_fetch_array() 中可選的第二個引數 是一個常量,可以接受以下值:mysql_assoc,mysql_num 和 mysql_both。

本特性是 php 3.0.7 起新加的。

本引數的預設值是 mysql_both。如果用了 mysql_both,將得到一個同時包含關聯和數字索引的陣列。用 mysql_assoc 只得到關聯索引(如同 mysql_fetch_assoc()那樣),用 mysql_num 只得到數字索引

3樓:匿名使用者

貌似和 mysql_fetch_assoc 一樣的麼 ....解釋同二樓

sql連線查詢語句問題,SQL連線查詢語句問題!!!

簡單寫的話,sql語句就是 select top 10 title date from select title date from new union select title date from res union select title date from affiche as tbltit...

sql查詢語句的問題,sql語句關於查詢的問題

select d,count from select day 訪問時間 d,ip位址,count from 訪問記錄表 where year 訪問時間 2008 and month 訪問時間 5 group by 1,2 一 如果你的資料庫伺服器獲取日期時間欄位的日數 1 31 不是day,請你修改...

SQL查詢語句

select a.b.id bparent id,b.name parent name from s auth a left outer join s auth b on a.parent id b.id where a.menu 0 這是查詢的主 select a.row number over ...