0
Well, I have this code:
public function Ler($tabela="funcionarios"){
$this->sql = $this->pdo->prepare("SELECT * FROM :tabela");
$this->sql->bindValue(':tabela',$tabela);
$this->sql->execute();
return $this->sql->fetchAll();
}
Then it returns an empty array.
But Already this code:
public function Ler(){
$this->sql = $this->pdo->prepare("SELECT * FROM funcionarios");
$this->sql->execute();
return $this->sql->fetchAll();
}
returns the array with the records, because bindValue does not work?
From now on, thank you :)