企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
# swoole\_mysql->on [TOC] 设置事件回调函数。目前仅支持`onClose`事件回调。 ~~~ function swoole_mysql->on($event_name, callable $callback); ~~~ ## onClose事件 当连接关闭时回调此函数。 ~~~ $db->on('Close', function($db){ echo "MySQL connection is closed.\n"; }); ~~~