I have a query that when executing it, gives the following error:
Catchable fatal error: Object of class mysqli could not be converted to string
I confess that I have never come across this error. All values are passing correctly. The code that is giving this error follows below:
mysqli_query(sprintf($this->conexao, "INSERT INTO cadastro_usuarios VALUES(null,0,'%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','A',NOW());",
mysqli_real_escape_string($this->conexao, $nome),
mysqli_real_escape_string($this->conexao, $email),
mysqli_real_escape_string($this->conexao, $dataNascimento),
mysqli_real_escape_string($this->conexao, $endereco),
mysqli_real_escape_string($this->conexao, $telefone),
mysqli_real_escape_string($this->conexao, $celular),
mysqli_real_escape_string($this->conexao, $apelido),
mysqli_real_escape_string($this->conexao, $genero),
mysqli_real_escape_string($this->conexao, $filhos),
mysqli_real_escape_string($this->conexao, $site),
mysqli_real_escape_string($this->conexao, $facebook),
mysqli_real_escape_string($this->conexao, $instagram),
mysqli_real_escape_string($this->conexao, $twitter),
mysqli_real_escape_string($this->conexao, $nomeFoto),
mysqli_real_escape_string($this->conexao, $descricao)));