W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
(PECL CUBRID >= 8.3.0)
cubrid_fetch_lengths — 返回一個數(shù)組,其中包含當前行中每個字段值的長度
cubrid_fetch_lengths(resource $result): array
此函數(shù)返回一個數(shù)值數(shù)組,其值的長度為 結(jié)果集當前行中的每個字段,否則返回 FALSE 失敗。
注意:如果字段數(shù)據(jù)類型為 BLOB/CLOB,則應使用 cubrid_lob_size() 獲取其長度。
result
result
來自對 cubrid_execute() 的調(diào)用
一個數(shù)值數(shù)組,當進程成功時。
失敗時為 false。
示例 #1 cubrid_fetch_lengths() example
<?php
$conn = cubrid_connect("localhost", 33000, "demodb");
$result = cubrid_execute($conn, "SELECT * FROM game WHERE host_year=2004 AND nation_code='AUS' AND medal='G'");
$row = cubrid_fetch_row($result);
print_r($row);
$lens = cubrid_fetch_lengths($result);
print_r($lens);
cubrid_disconnect($conn);
?>
以上示例會輸出:
Array ( [0] => 2004 [1] => 20085 [2] => 15118 [3] => 30134 [4] => AUS [5] => G [6] => 2004-8-20 ) Array ( [0] => 4 [1] => 5 [2] => 5 [3] => 5 [4] => 3 [5] => 1 [6] => 10 )
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: