I’m trying to call a stored procedure which works fine (phpMyAdmin).
In the controller:
$segments = $connection ->execute('CALL SegmentsPerArea(@area_id)')
// ->execute(‘CALL SegmentsPerArea(:area_id)’,[‘area_id’=>@area_id])
’; print_r($segments); echo ‘’ shows I’m not getting data back to the controller.
SELECT ‘Called segments per area’ AS Output;
SELECT area_id AS Parameter;
to the stored procedure, I’m getting Output back in the controller, not the Parameter.
So, I think I’m not able to correctly pass the area_id to the stored procedure (tried 2 ways). Googling doesn’t give much info, and if, solutions are cakephp 2 and 3. Searching the cookbook with ‘call stored procedure’ gives no hits.
What’s the solution?