我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

运行复杂的多表mysql查询的问题

i need to show pages'details , now i used this query to fetch from 3 tables

group_concat( )

its working fine but shows array of tags and topics duplicated.

You're getting extra rows from the join. Add DISTINCT to the GROUP_CONCAT construct:

SELECT  table_stories.*,
  table_stories.sid,table_tags.tid,table_topics.topicid,
  group_concat(DISTINCT table_tags.tag ) as mytags,
  group_concat(DISTINCT table_topics.topicname ) as mytopics
FROM table_stories,table_tags,table_topics

近期文章

  • 这个树形结构怎么转换?
  • chatgpt答不出来的问题
  • 计量经济模型,eviews
  • 求解答,项目运行报错,不知问题出在哪里
  • vs2022 c语言 Unicode 读写文件的问题
  • 安装python长时间停留在安装界面,是啥原因?
  • 关于#小程序#的问题:发现又恢复了未登录页面
  • 无法添加/更新用户(虽然可以列出并删除它们)
  • 关于#PRISM数据插值#的问题,如何解决?(标签-算法|关键词-数据空间)
  • 请问SimCSE中对比学习是用于预训练中还是微调中?
  • C语言中指针定义的问题
  • 安卓动态绘制曲线不能实时绘制
  • DBeaver导入时excel数据出错
  • DBeaver导入excel数据出错
  • 【C++】实心改空心菱形
  • PHP / mysqli:使用mysqli_stmt_bind_param()插入IP地址
  • NameError: name 'nn' is not defined
  • andriod实现截取当前手机屏幕
  • Kibana 7.8前端IFrame集成,隐藏Add filter?
  • 请问网页打开出现乱码是什么原因呢?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华