Closed wuchuguang closed 6 years ago
onWorkerStart的时候,协程还没有初始化好。
yied在框架的基础上,好像都不能使用。onWorkerStart,等等。那有没有同步mysql的?
现在pool->go();拿到的select数据,数据类型全是string. 但事实表有某些int/bigint类型的。我要自已转了,不转的话,传给前端无法用===,只能用== 所以想在服务器启动时,一次性把表结构拿到手。后面数据做转换。
可以使用同步的方法,就是原始的 Pdo。
msf有现成pdo封装吗?
没有原始的Pdo封装,我建议在Config进程或者Timer进程里实现初始化数据表结构的逻辑,具体使用方法可以参考文档或者demo。
没有打印print_r($tables);