时间:2021-07-01 10:21:17 帮助过:4人阅读
实例1:
代码如下:
$q = sybase_query("SELECT COUNT(DISTINCT OPPORTUNITY_ID) FROM M_OPP_INTERESTS WHERE INTEREST_ID = $i_id", $db);
while ($op_by_int = sybase_fetch_array($q)) {
while (list($k, $v) = each($op_by_int)) {
echo "\$op[$k] => $v\n";
}
?>
返回资料如下
$op[0] => 2164
$op[computed] => 2164
实例2:
代码如下:
$dbh = sybase_connect('SYBASE', '', '');
$q = sybase_query('SELECT * FROM p, a WHERE p.person_id= a.person_id');
var_dump(sybase_fetch_array($q));
sybase_close($dbh);
?>
The above example would produce the following output (assuming the two tables only have each one column called "person_id"):
代码如下:
array(4) {
[0]=>
int(1)
["person_id"]=>
int(1)
[1]=>
int(1)
["person_id1"]=>
int(1)
}
http://www.bkjia.com/PHPjc/754796.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/754796.htmlTechArticle返回数组资料。 语法: array sybase_fetch_array(int result); 返回值: 数组 函数种类: 数据库功能 内容说明 本函数用来将查询结果 result 拆到数组变...