前几天在做查询的时候,由于使用了字段拼接,所以查出来的其中一列,数据很长,但是每次显示一定的长度后,后面的就无法显示

原因是因为mysql设置查询出来的长度,好像默认是1024,因为我使用的是yii2;所以执行一下sql(首先你要有最高权限)

$sql = "SET GLOBAL group_concat_max_len = 102400";
$db->createCommand($sql)->execute();
$sql = "SET SESSION  group_concat_max_len = 102400";
$db->createCommand($sql)->execute();

 

相关文章:

  • 2022-12-23
  • 2021-08-11
  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
猜你喜欢
  • 2021-12-24
  • 2022-12-23
  • 2021-05-13
  • 2021-12-29
  • 2022-12-23
  • 2022-01-20
  • 2022-12-23
相关资源
相似解决方案