Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/238.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.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
Php mysqli_stmt::get_result()未定义_Php_Mysqli - Fatal编程技术网

Php mysqli_stmt::get_result()未定义

Php mysqli_stmt::get_result()未定义,php,mysqli,Php,Mysqli,使用php 5.5.7版,我查看了php编写语句的mysqli示例: 在示例5中,他们使用方法调用: $stmt = $mysqli->prepare("SELECT id, label FROM test WHERE id = 1"); $stmt->execute(); $res = $stmt->get_result(); $row = $res->fetch_assoc(); 但是,我似乎无法在自己的环境中调用get\u result。Netbeans也没有为此

使用php 5.5.7版,我查看了php编写语句的mysqli示例:

在示例5中,他们使用方法调用:

$stmt = $mysqli->prepare("SELECT id, label FROM test WHERE id = 1");
$stmt->execute();
$res = $stmt->get_result();
$row = $res->fetch_assoc();
但是,我似乎无法在自己的环境中调用
get\u result
。Netbeans也没有为此显示自动完成。这是我缺少的实际方法,还是示例中的方法名称不正确?

请注意for
get\u result()中的这一行:


要使用它,您必须编译包含mysqlnd的PHP,或者以其他方式包含它。您可能会发现托管系统上的支持有限,因此最好忽略它。

这仅在mysqli编译为(php本机驱动程序)时可用。谢谢,这似乎就是问题所在。
Available only with mysqlnd.