自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

MySQL數(shù)組函數(shù)--mysql_fetch_array()

數(shù)據(jù)庫(kù) MySQL
MySQL中有很多功能強(qiáng)大的函數(shù),下面為您介紹的函數(shù)mysql_fetch_array()屬于MySQL數(shù)組函數(shù),如果您對(duì)此感興趣,不妨一看。

MySQL有一類獨(dú)特的函數(shù),稱為MySQL數(shù)組函數(shù),下面為您介紹的就是其中的MySQL數(shù)組函數(shù)--mysql_fetch_array()。

mysql_fetch_array 從結(jié)果集中取得一行作為關(guān)聯(lián)數(shù)組,或數(shù)字?jǐn)?shù)組,或二者兼有。

依次調(diào)用此函數(shù)也會(huì)返回結(jié)果集的下一行。

該MySQL數(shù)組函數(shù)語(yǔ)法:mysql_fetch_array(resource result, result type)

返回結(jié)果一般為:
 Array ( [0] => 1 [ID] => 1 [1] => 58.215.76.161 [IP] => 58.215.76.161 [2] => linux [description] => linux [3] => 1 [4] => http [protocol] => http [5] => 80 [port] => 80 [6] => http [7] => check_http [command] => check_http )

如果只需要關(guān)聯(lián)數(shù)組則命令參數(shù)為
  mysql_fetch_array($rs,MYSQL_ASSOC) 相當(dāng)于函數(shù)mysql_fetch_assoc()。

返回結(jié)果為

Array ( [ID] => 1 [IP] => 58.215.76.161 [description] => linux [protocol] => http [port] => 80 [command] => check_http )

如果只需要數(shù)字?jǐn)?shù)組則命令參數(shù)為

mysql_fetch_array($rs,MYSQL_NUM) 相當(dāng)于函數(shù)mysql_fetch_row().

返回結(jié)果為

Array ( [0] => 1 [1] => 58.215.76.161 [2] => linux [3] => 1 [4] => http [5] => 80 [6] => http [7] => check_http )

 

 

【編輯推薦】

MySQL日期的相關(guān)函數(shù)介紹

帶您深入了解MYSQL Cast函數(shù)

查看三種MySQL字符集的方法

查看MySQL默認(rèn)字符集

MySQL外鍵在數(shù)據(jù)庫(kù)中的作用

 

責(zé)任編輯:段燃 來(lái)源: 互聯(lián)網(wǎng)
相關(guān)推薦

2009-12-07 19:06:20

PHP mysql_f

2010-06-04 14:10:09

MySQL_fetch

2010-10-11 16:05:37

mysql表單

2009-11-16 15:07:23

PHP數(shù)組函數(shù)庫(kù)

2011-03-30 16:15:53

Array數(shù)組

2009-11-24 17:52:46

PHP函數(shù)in_arr

2009-11-24 18:18:21

PHP函數(shù)array_

2009-11-24 17:45:47

PHP數(shù)組排序函數(shù)ar

2009-11-24 18:08:39

PHP函數(shù)array_

2009-11-25 14:44:34

PHP函數(shù)array_

2010-10-14 14:01:35

MySQL CONVE

2010-11-25 11:01:33

MySQL日期函數(shù)

2010-10-11 16:19:30

Mysql聚合函數(shù)

2009-11-24 18:28:44

PHP函數(shù)array_

2009-11-25 16:40:55

PHP函數(shù)array_

2010-06-13 10:18:08

MySQL 數(shù)據(jù)庫(kù)函數(shù)

2010-10-09 16:18:43

MYSQL IFNUL

2010-10-11 16:23:35

MYSQL BENCH

2010-10-11 15:08:44

MySQL conca

2010-05-27 13:26:20

MySQL日期時(shí)間函數(shù)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)