duanhuan3012 2010-02-26 11:28
浏览 61

在Eclipse下运行PHPunit测试时未发现Mysqli语句参数

I run PHPunit tests via Apache, ou directly in Eclipse (ZendStudio in fact). All run well via Apache, but under Eclipse i have this error :

zend mysqli statement execute error no data supplied parameters prepared statement

The php version is the same (5.2.10), ZendFramework is 1.9 and here is the code

function isValidProject($sName)
{
$db = Zend_Db_Table::getDefaultAdapter();
$req = $db->prepare('SELECT id_project FROM sys_projects WHERE url_alias=?');
$req->bindParam(1, $sName);
$req->execute();
$row = $req->fetch();
if($row) return $row['id_project']; 
else return FALSE; 
}

I have tried with this way too, with the same result

$req = $db->query('SELECT id_project FROM sys_projects WHERE url_alias=?', array($sName));

Thanks
Cédric

  • 写回答

1条回答 默认 最新

  • duanpo6079 2010-02-28 18:48
    关注

    I've similar errors, where one of the places I was running the code did not have the same module configuration as the other - in that case, mysqli was not installed/available on the server that reported the failure.

    examining the output of phpinfo(), run through Apache vs Eclipse should provide some enlightenment.

    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料