This problem is specific to adodb library. I've called stored procedures from oracle without problems. Now I am using a mysql stored procedure. It seems my syntax is wrong.
The stored procedure
create_order_from_basket(
IN P_customer_id INT,
OUT P_order_id INT,
OUT P_out_status CHAR(1),
OUT P_out_status_code VARCHAR(32))
The code
Code: Select all
//tried this
$stmt = $this->cn->PrepareSP('call create_order_from_basket ');
//and this (option2)
$stmt = $this->cn->PrepareSP(' create_order_from_basket ');
//and this
$stmt = $this->cn->PrepareSP(' create_order_from_basket ((:P_customer_id,:P_order_id,:P_out_status,:P_out_status_code)) ');
$this->cn->InParameter($stmt,$customer_id,'P_customer_id');
$this->cn->OutParameter($stmt,$P_order_id,'P_order_id');
$this->cn->OutParameter($stmt,$P_out_status,'P_out_status');
$this->cn->OutParameter($stmt,$P_out_status_code,'P_out_status_code');
Any ideas?
Thank you