cubrid_result
(PECL CUBRID >= 8.3.0)
cubrid_result — Return the value of a specific field in a specific row
说明
This function returns the value of a specific field in a specific row from a result set.
参数
resultresultcomes from a call to cubrid_execute()rowThe row number from the result that is being retrieved. Row numbers start at 0.
fieldThe name or offset of the
fieldbeing retrieved. It can be the field's offset, the field's name, or the field's table dot field name (tablename.fieldname). If the column name has been aliased ('select foo as bar from...'), use the alias instead of the column name. If undefined, the first field is retrieved.
示例
示例 #1 cubrid_result() example
<?php
$conn = cubrid_connect("localhost", 33000, "demodb");
$req = cubrid_execute($conn, "SELECT * FROM code");
$result = cubrid_result($req, 0);
var_dump($result);
$result = cubrid_result($req, 0, 1);
var_dump($result);
$result = cubrid_result($req, 5, "f_name");
var_dump($result);
cubrid_close_request($req);
cubrid_disconnect($conn);
?>以上示例会输出:
string(1) "X" string(5) "Mixed" string(4) "Gold"
+添加备注
用户贡献的备注
此页面尚无用户贡献的备注。
备份地址:http://www.lvesu.com/blog/php/function.cubrid-result.php