1 Reply Latest reply: Dec 1, 2011 3:07 PM by cj RSS

    Re: Call to a member function load() on a non-object

    903236
      Fatal error: Call to a member function load() on a non-object in C:\xampp\htdocs\ast\class_db.php on line 289

           private function ret_clob($cn){
                switch ($this->get_db()) :
                case "oracle" :
      _               $lbl = $this->result[$cn]->load();_
                     break;
                case "mysql" :
                     $lbl = $this->result[$cn];
                     break;
                endswitch;
                return $lbl;
           }
           
           public function db_fetch_assoc($col = null) {

                switch ($this->db_db) :
                case "oracle" :
                     $this->result = oci_fetch_array ( $this->stid, OCI_ASSOC + OCI_RETURN_NULLS );
                     if(!is_null($col)){          
                          foreach ( $col as $ar){
                               foreach ($ar as $cn => $ct ) {
                                    if($ct == "CLOB") {
                                         $this->result[$cn] = $this->ret_clob($cn);
                                    }
                               }
                          }
                     }

                     break;
                case "mysql" :
                     $this->result = $this->stid->fetch_assoc ();
                     break;
                endswitch;
                return $this->result;
           }