Does a function only work if we call it in some file or will it work anyway? For example, to pass the value from one variable to another in the rendering file, I know I should 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;
}
.
Do I need to call it in some other file or does this function work automatically?