dsfd3546 2016-01-29 11:50
浏览 45
已采纳

Eclipse中没有MySQLi的自动完成功能

I have just written my first connection from PHP to mySQL using mySQLi. I noticed that there is no autocompletion for mySQLi objects. For example in this code there is no autocompletion for $result->num_rows and $result->data_seek($j). For php the autocompletion works as expected. What I am doing wrong?

<?php
require_once 'login.php';

$conn = new mysqli($hn,$un,$pw,$db);
if($conn->connect_error){
    echo"huhuhuhu";
}

$query = "select * from classics";
$result = $conn->query($query);
if(!$result){
    die("result je null");
}

$rows = $result->num_rows; // no autocompletion

for ($j = 0; $j<$rows; $j++){
    $result->data_seek($j); // no autocompletion
}
  • 写回答

1条回答 默认 最新

  • douwen1213 2016-01-29 11:53
    关注

    Since php is an interpreted language, the script would have to be executed in order for $result to have any values.

    As far as i know, eclipse doesn't do that. (And I doubt there are many editors/ide's that do)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

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