I made all the configuration to connect in Oracle, it connects, but I want to make an query inside a function, but it is giving the following error message:
QueryException in Connection.php line 729: oci_bind_by_name (): ORA-01036: illegal variable name / number (SQL: SELECT function (': login') FROM DUAL)
The query I'm trying to do is like this:
public function login()
{
$login = Request::input('login');
$var = DB::connection('oracle1')
->select("SELECT funcao(':login') FROM DUAL",
array( "login" => $login));
return 'Resultado: '.$var;
}
If having with question (?)
DB::connection('oracle1')
->select("SELECT funcao('?') FROM DUAL",
array( "login" => $login));
The message gives a small change:
oci_bind_by_name (): ORA-01036: illegal variable name / number (SQL: SELECT function ('CARLOS.BRITO') FROM DUAL)