gpt4 book ai didi

php - mysql field_count 在 php 中更改还是我错了?

转载 作者:行者123 更新时间:2023-11-30 01:18:10 25 4
gpt4 key购买 nike

据我所知,如果返回集为空。 mysqli_result::$field_count 始终为 0。

但是,在 Debian Linux 中将 php 升级到 5.4.4-14_deb7u4 (cli)(构建日期:2013 年 8 月 23 日 14:37:41)后,我发现 mysqli_result::$field_count 始终是 select 语句中的列数。

<?php
//always return field_count = 2, although 'niuniu' is not in the table;
$sql = "select _id, _id from user_info where name='niuniu'";

我看到粉红色的大象了吗?

最佳答案

您确定要查看字段数,而不是数吗?

看看mysqli_num_rows() .

关于php - mysql field_count 在 php 中更改还是我错了?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18840380/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com