get_result()即使启用了mysqlnd也无法正常工作 [英] get_result() Doesn't Work even mysqlnd is enabled

查看:108
本文介绍了get_result()即使启用了mysqlnd也无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是许多问题的重复,但是我似乎没有从任何存在的问题中得到答案.我正在使用hostgator提供的multi domain linux hosting.我尝试使用mysqli_stmt_get_result(),但它抛出一个错误,指出作为undefined method.我联系了hostgator管理面板,他们为我启用了mysqlnd扩展名.我的确在我网站的phpinfo中看到了mysqlnd扩展名启用.但是我仍然看到相同的错误.

It might be a duplication of many questions however i dont seem to get my answer from any of the questions present.I am using multi domain linux hosting provided by hostgator.I tried to use mysqli_stmt_get_result() but it throws me an error stating as anundefined method.I contacted the hostgator admin panel and they enabled the mysqlnd extension for me.I do see the mysqlnd extension enabled in phpinfo of my website.However i still see the same error.

$mysqlnd = function_exists('mysqli_stmt_get_result');

if ($mysqlnd) {
    echo 'mysqlnd enabled!';
}
else
   var_dump("nope");

我试图检查它是否已启用,它显示为nope,但我确实在我的phpinfo中看到mysqlnd已启用.

I tried to check if it is enabled or not , it says nope but i do see mysqlnd as enabled in my phpinfo.

问题是什么,我该如何解决?加上其他任何方法都不能使用,因为我已经使用mysqli_stmt_get_result()编码了整个项目.

What is the problem and how can i solve this one ? Plus using with any other method is not an option because i have already coded the whole project using mysqli_stmt_get_result().

更新:

查询:

 $stmt=$this->link->prepare("SELECT `Session_Data`,`ip_address` FROM Session WHERE `Session_Id` = ? AND `Session_Expires` > '".date('Y-m-d H:i:s')."'");

        $stmt->bind_param("s",$id);
        $stmt->execute();
         $res=$stmt->get_result();

推荐答案

在这里,我要回答所有被此问题困扰的人的问题.要使其正常工作,请在php扩展中启用nd_mysqli禁用mysqli.它将像魅力一样工作!祝你好运.

I am answering my own question here as for all the people who are stuck in this thing.To make this thing work, Enable nd_mysqli in php extensions and disable mysqli.This will work like charm! Good Luck.

这篇关于get_result()即使启用了mysqlnd也无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆