Catchable fatal error: Object of class DB could not be converted to string
böyle bir hata alıyorum sebebi nedir yardımcı olacak arkadaşlara şimdiden teşekkürler
class DB
{
private $sorgu,$select,$from,$where;
public function select($deger){
$this->select=$deger;
}
public function from($deger){
$this->from=$deger;
}
public function where($deger){
$this->where=$deger;
}
function __destruct(){
$this->sorgu="select ".$this->select." from ".$this->from." where ".$this->where;
return $this->sorgu;
}
}