0

I am using cakephp to call a stored procedure like this:

$results = $this->query('call p2');
echo $results;

I keep getting this error though:

Error: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered 
queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code 
is only ever going to run against mysql, you may enable query buffering by setting the 
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute.

My stored procedure is as follows (an works in MySQL):

DELIMITER //  

CREATE PROCEDURE `p2` ()  
LANGUAGE SQL  
DETERMINISTIC  
SQL SECURITY DEFINER  
COMMENT 'A procedure'  
BEGIN  
    SELECT 'Hello World !';  
END//  
4

1 回答 1

0

编辑:我认为你在调用过程时遇到了一些问题,cakephp而不是在MySQL.

于 2012-08-02T07:49:32.380 回答