我的表格中有如下数据。
1042
1234
1234
.
.
我想在数字之间添加逗号,如下所示
1,0,4,2
1,2,3,4
1,2,3,4
.
.
MySQL中有没有函数可以做到这一点。
Note: entry in that column is dynamically change. so can not able hardcore the value.
任何想法提前致谢。
最佳答案
您可以在下面的数据库使用条目之前添加此内容。
$oldstring = 123456;
echo $newstring = implode(",", str_split($oldstring));
//output 1,2,3,4,5,6
关于Mysql 数字之间添加逗号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35286892/