Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/09/2011, 15:01
Avatar de engonga
engonga
Usuario no validado
 
Fecha de Ingreso: marzo-2002
Ubicación: Buenos Aires
Mensajes: 1.300
Antigüedad: 22 años, 1 mes
Puntos: 8
error en un script muy raro

hola tengo este script

Código PHP:
<?php
class Inlinecms {
    public 
$DBOR;

    public 
$autoid;
    public 
$type;
    public 
$id;
    public 
$name;
    public 
$value;
    public 
$date;
    public 
$status;    
    public 
$lang;    
    
    public function 
__construct() {
        try {
        
        
$instance = new PDO("mysql:localhost;dbname=db63542_dev""root""ushuai222");
        
$instance->setAttribute(PDO::ATTR_ERRMODEPDO::ERRMODE_EXCEPTION);
        } catch(
PDOException $e) {    
            echo 
$e->getMessage();
        }
        
$this->DBOR $instance;
    }
    
    public function 
setCmsinline() {
        try {
            
$query "INSERT INTO cmsinline ( 
                      type, 
                      id, 
                      name, 
                      value, 
                      date, 
                      status,
                      lang
            ) VALUES (
                '"
.addslashes($this->type)."',
                '"
.addslashes($this->id)."',
                '"
.addslashes($this->name)."',
                '"
.addslashes($this->value)."',
                now(),
                0,
                '"
.addslashes($this->lang)."'
            )"
;
            
$this->DBOR->setAttribute(PDO::MYSQL_ATTR_DIRECT_QUERYfalse);
            
$sth $this->DBOR->prepare($query);
            
$sth->execute();
            
$this->autoid $this->DBOR->lastInsertId();
        } catch(
PDOException $e) {    
            echo 
$e->getMessage();
        } 
        return 
$this->autoid;
    }
    
    public function 
getCmsinlineByType() {
            
$return = array();
        
$query "SELECT * FROM cmsinline WHERE type = '".$this->type."' AND status = 0 AND lang = '".$this->lang."'";
        
$sth $this->DBOR->prepare($query);  
        
$sth->execute();
        while (
$result $sth->fetch(PDO::FETCH_OBJ))
            
$return[$result->id][$result->name] = $result;
        return 
$return;
    }
    
    public function 
getNextId() {
        
$query "SELECT max(id) as id FROM cmsinline WHERE status = 0";
        
$sth $this->DBOR->prepare($query);  
        
$sth->execute();
        
$result $sth->fetch(PDO::FETCH_OBJ);
        return (
$result->id 1);
    }
    
    public function 
updateCmsinline() {
        try {
            
$query "UPDATE cmsinline SET value = '".addslashes($this->value)."', date=now() WHERE id='".addslashes($this->id)."' AND type='".addslashes($this->type)."' AND name='".addslashes($this->name)."' AND status='0' ";
            
$sth $this->DBOR->prepare($query);  
            
$sth->execute();    
        } catch(
PDOException $e) {    
            echo 
$e->getMessage();
        }     
    }
    
    public function 
deleteCmsinline() {
        try {
            
$query "UPDATE cmsinline SET status = '".addslashes($this->status)."', date=now() WHERE id='".addslashes($this->id)."'";
            
$sth $this->DBOR->prepare($query);  
            
$sth->execute();    
        } catch(
PDOException $e) {    
            echo 
$e->getMessage();
        }     
    }
}
?>
pero no se que pasa que cuando lo ejecuto me da el siguiente error

Código HTML:
could not find driver
Fatal error:  Call to a member function prepare() on a non-object in C:\AppServ\www\vinamar\inlinecms.class.php on line 57
ALGUIEN ME PUEDE ECHAR UN CABLE?