I'm having a problem calling a stored procedure that has two OUT parameters. I cannot access them.
Here is my procedure's first line:
PROCEDURE `validate_reservation`(IN people INT, IN r_date DATETIME,IN place_id INT,IN max_people INT,IN more_people TINYINT(1),OUT r_status CHAR(20),OUT message CHAR(100))
DB::statement("call validate_reservation(4,'2016-04-26 20:30',1,10,1,$status,$message)");
With OUT parameters, you're dealing with MySQL variables - these are prefixed with @.
@status, @message instead of
$status, $message. Also, you may want to use binding to pass the other values.
These won't populate PHP variables in any case. If you want to get them in PHP, you'll need to SELECT them, e.g.
SELECT @status, @message using