我有一个存储过程,名为" myprocedure"。我如何从Magento中调用它?
我试过了:
$resource = Mage::getSingleton('core/resource');
$writeConnection = $resource->getConnection('core_write');
$query = 'CALL myprocedure()';
$results = $writeConnection ->fetchAll($query);
var_dump($results);
这给我一个PDO错误,为什么?
谢谢!
答案 0 :(得分:2)
$ writeConnection-> EXEC();可以帮到你