扫码关注官方订阅号
news表:
tag表:
为什么用下面这条SQL语句
select * from tag where tid in (select tids from news where nid=1);
查询结果是: 1 PHP
我想要的查询结果是: 1 PHP 2 Mysql 3 Apache
认证高级PHP讲师
没这么复杂啦select * from tag where tid instr (select tids from news where nid=1);就行了
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
没这么复杂啦
select * from tag where tid instr (select tids from news where nid=1);就行了