dthdlv9777 2011-04-20 01:00
浏览 197
已采纳

没有group_concat的sqlite group_concat

I'm in a bit of a bind: I'm limited to using sqlite 3.4.2 w/ php5-sqlite (ubuntu hardy) and I've got some complex queries that were written using the group_concat() function.

Now, this function isn't supported in version 3.4.2 of sqlite, and I can't for the life of me alter to the query to NOT use group_concat().

So, is it even possible?

Example below:

delete from table x where (select group_concat(id) || ',' from users where department_id = NEW.id) like '%' || x.id || ',%';
  • 写回答

1条回答 默认 最新

  • douke6857 2011-04-20 21:06
    关注

    Alright, well I've found the 'solution': turns out its extremely easy to upgrade the sqlite3 version that the PDO driver is using:

    wget http://us.archive.ubuntu.com/ubuntu/pool/main/s/sqlite3/libsqlite3-0_3.7.4-2ubuntu5_i386.deb
    sudo dpkg -i libsqlite3-0_3.7.4-2ubuntu5_i386.deb
    sudo invoke-rc.d lighttpd force-reload
    

    While the ideal situation would be to upgrade the application to the latest LTS release of Ubuntu - due to time constraints, that was not really an option.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器