laravel-oci8 icon indicating copy to clipboard operation
laravel-oci8 copied to clipboard

Failed to execute function executeFunction

Open mohkin opened this issue 7 years ago • 2 comments

Summary of problem or feature request

executeFunction Fails

Error Code    : 6550\r\n
Error Message : ORA-06550: line 1, column 18:\n
PLS-00224: object 'BOOKING_MNT.CHECK_LOCATION_TIME(P_LOCATION, TO_DATE(P_DATE, DD-MM-YYYY HH24:MI))' must be of type function or array to be used this way\n
ORA-06550: line 1, column 7:\n
PL/SQL: Statement ignored\r\n
Position      : 17\r\n
Statement     : begin :result := BOOKING_MNT.CHECK_LOCATION_TIME(:p_location,to_date(:p_date,'DD-MM-YYYY HH24:MI'))(:p_location, :p_date); end;\r\n
Bindings      : [11101,01-01-2018 14:01,0]\r\n

Code snippet of problem

$bindings = [ "p_location" => [ 'type' => PDO::PARAM_STR  , 'value' => $location],
	        	 "p_date" => ['type' => PDO::PARAM_STR, 'value' => $date]];
$result = DB::executeFunction("BOOKING_MNT.CHECK_LOCATION_TIME(:p_location,to_date(:p_date,'DD-MM-YYYY HH24:MI'))", $bindings, PDO::PARAM_BOOL);

`

System details

  • Windows
  • PHP 7.1.7
  • Laravel 5.6
  • Laravel-OCI8 Version 5.6

mohkin avatar Mar 21 '18 23:03 mohkin

please have a look at how all this is implemented: https://github.com/yajra/laravel-oci8/blob/5.6/src/Oci8/Oci8Connection.php#L219

i must admit its far away from perfect & good documented.

do you have the function code? would like to have a look

mstaack avatar Jul 10 '18 16:07 mstaack

Same Problem. I have seen the implemented version and i can't understand it. Since 2016 is a new Version available as Pull-Request. It is Linked (https://github.com/yajra/laravel-oci8/pull/183/files) in the Documentation (https://yajrabox.com/docs/laravel-oci8/master/function). You make it like the dokumentation says and you only get errors since the Dokumentation is crab. It is impossible to do it like in the Dokumentation. It can't never function this way with the implemented version.

Why is there a Dokumentation with examples when it is imposible to get it to work with it? Why isn't the version implemented links in the Dokumentation? If you use it ther wouldn't be any problems... can't understand this.

MikeTh01 avatar Apr 23 '20 12:04 MikeTh01

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Nov 18 '22 03:11 github-actions[bot]

This issue was closed because it has been inactive for 7 days since being marked as stale.

github-actions[bot] avatar Nov 26 '22 02:11 github-actions[bot]