dongzouh51192 2015-10-02 21:16
浏览 17
已采纳

从对象获取值

My query is return a stdclass of objects

How i can get value of - affected_rows -

    Object (
    [affected_rows] => 0  
    [connect_errno] => 0 
    [connect_error] => [errno] => 0 
    [error] => [error_list] => Array ( ) [field_count] => 0
    [host_info] => localhost 
    [stat] => Uptime: 261195 Threads: 5 Questions: 14167 Slow queries: 0 
Opens: 2969 Flush tables: 1 Open tables: 191 Queries per second avg: 0.054 
   [thread_id] => 1593 [warning_count] 
=> 0 ) [result:protected] => mysqli

i tried pass the objects as a array but dont works

thanks

  • 写回答

1条回答 默认 最新

  • 普通网友 2015-10-02 21:17
    关注

    Properties of object are accessed with ->

    var_dump($object->affected_rows);
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作