[PHP-users 20621]Re: DBからの配列を読めません

Tadashi Jokagi ml @ elf.no-ip.org
2004年 3月 2日 (火) 12:41:45 JST


      ぢょ〜@よくきたなです.
      多分エラーです.下記のような行を追加してみてはいかがでしょう?
    で,どういうことが起こって件のエラーが出てくるかというのはクラスに
    ついて勉強してみるといいとおもいます.

inamuran36 @ mahikari.or.jpさんの「[PHP-users 20620] DBからの配列を読めません」から
>         $db_result = $this->db_object->Query($query);

      if ( DB::isError( $db_result)) {
        print $db_result->getDebugInfo();
        exit;
      }

>
>         while($row = $db_result->fetchRow(DB_FETCHMODE_ASSOC)){   //問題の行
>	       $this->smarty_obj->assign("i_bango",$row["bango"]);
>	       $this->smarty_obj->assign("i_name",$row["usr_name"]);
>	       $this->smarty_obj->assign("i_buy",$row["buy"]);
>	       $this->smarty_obj->assign("i_printed",$row["printed"]);
>               $this->smarty_obj->display("ichiran.tpl");
>         }
>      $this->db_object->disconnect();
>      }
>
>}
-- 
----.----1----.----2----.----3----.----4----.----5----.----6----.----7
Tadashi Jokagi/Shibuya city mailto:elf @ elf.no-ip.org
YokukitanaII http://elf.no-ip.org/
Yokukitawiki http://elf.no-ip.org/wiki/
Yokukitablog http://elf.no-ip.org/blog/


PHP-users メーリングリストの案内