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);
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。