-1
A function only works if we call it in some file or it will work anyway? For example, to pass the value from one variable to another in the processing file, I know I must call the function to give value to the variable. But when I just want to pass a value from one string to another string, for example:
public function conta_teste_profissional($codigo){
$conexao = Database::getConnection();
$busca = "SELECT * FROM teste WHERE cod_usuario_profissional = $codigo;";
$resultado = $conexao->query($busca);
$retorno = $resultado->fetchAll(PDO::FETCH_ASSOC);
$tamanho = count($retorno);
return $tamanho;
}
.
I need to call it in some other file or this function will work automatically?
Try to be more specific in your doubt...
– Sr. André Baill
The question is not very clear to me, to be executed, a function needs to be called idependentemente from the file (since it has been loaded). What would be "will work anyway"?
– Costamilam