Loading ...
Sorry, an error occurred while loading the content.

PEAR MDB2 error

Expand Messages
  • pritesh loke
    Hello I am trying MDB2 in pear in php true); $mdb2 =&
    Message 1 of 1 , Dec 25, 2006
    • 0 Attachment
      Hello
      I am trying MDB2 in pear in php
      <?
      require_once "MDB2.php";
      $dsn = "mysql://root:ppp@localhost/mht";
      $options = array('persistent'=>true);
      $mdb2 =& MDB2::factory($dsn,$options);
      //if (MDB2::isError( $mdb2)) {
      //die($mdb2->getMessage().' - '.$mdb2->getUserinfo());
      //}
      $mdb2->setFetchMode(MDB2_FETCHMODE_ASSOC);
      $sql = "select * from master";
      $result = $mdb2->query($sql);
      while($row=$result->fetchrow())
      {
      print $row['username']."<br />";
      }
      $result->free();
      ?>

      giving me this error pls help
      Fatal error: Call to undefined method MDB2_Error::setFetchMode() in D:\Program Files\xampp\htdocs\prrish\PEAR\dbdemo.php on line 11



      __________________________________________________
      Do You Yahoo!?
      Tired of spam? Yahoo! Mail has the best spam protection around
      http://mail.yahoo.com

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.