Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/search/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
mysql字段计数在php中是更改了还是我错了?_Php_Mysql - Fatal编程技术网

mysql字段计数在php中是更改了还是我错了?

mysql字段计数在php中是更改了还是我错了?,php,mysql,Php,Mysql,据我所知,如果返回集为空。mysqli_结果::$field_计数始终为0 但是,我发现mysqli_result::$field_count始终是在Debian Linux中将php升级到5.4.4-14_deb7u4(cli)(构建时间:2013年8月23日14:37:41)后select语句中的列数 <?php //always return field_count = 2, although 'niuniu' is not in the table; $sql = "select

据我所知,如果返回集为空。mysqli_结果::$field_计数始终为0

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

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

您确定要查找的是字段数,而不是行数吗


看看。

现在我使用num_行。然而,我只记得field_count也起作用。就像我以前的代码一样。