Join查询中表名替换:
$str = 'left join aaaaa on a.id=b.id left join bbbb as b a.id=b.id';
$tablePre = 'tutiantian_';
echo preg_replace('/(left join|right join|inner join)\s+(\w+)\s+/i'," $1 {$tablePre}$2 ",$str);
Join查询中表名替换:
$str = 'left join aaaaa on a.id=b.id left join bbbb as b a.id=b.id';
$tablePre = 'tutiantian_';
echo preg_replace('/(left join|right join|inner join)\s+(\w+)\s+/i'," $1 {$tablePre}$2 ",$str);
2025 - 快车库 - 我的知识库 重庆启连科技有限公司 渝ICP备16002641号-10
企客连连 表单助手 企服开发 榜单123