$sql="drop procedure if exists orderprocedure20;
create procedure orderprocedure20()
begin
SELECT order_status INTO @status FROM win_order WHERE order_id=20;
if @status=1 then UPDATE win_order SET order_status=8 WHERE order_id=20;
UPDATE win_goods SET stock=stock+1 WHERE id=1;
end if;
drop event if exists orderevent20;
end;
";
Db::execute($sql);
执行总报错
在tp3.2和直接在mysql命令行里面都可以成功,求解,这是为什么?
最佳答案