如何获取 mysql 中列的转储>
我想在 php 中转储像 var_dump 这样的列。
例如:
从表名中选择转储(col_name)
o/p =>
Typ=96 Len=10: 113,119,101,114,116,121,32,32,32,32
但它说这样的函数不存在。 mysql 中的哪个函数可以做到这一点或者如何实现它
I want to have dump of column like var_dump in php.
For eg:
select dump(col_name) from table_name
o/p =>
Typ=96 Len=10: 113,119,101,114,116,121,32,32,32,32
but it says such function does not exists. which function in,mysql does that or how to go for it
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
GROUP_CONCAT
获取以逗号分隔的值列表:注意。
GROUP_CONCAT
的结果取决于max_allowed_packet
和group_concat_max_len
变量;如果表中有很多记录,则需要增加默认值(SET group_concat_max_len = xxxx
);You can use
GROUP_CONCAT
to get list of values separated by comma:Note. The result of
GROUP_CONCAT
depends onmax_allowed_packet
andgroup_concat_max_len
variables; if you have many records in your table, you need to increase default values (SET group_concat_max_len = xxxx
);