这是一个创建于 4589 天前的主题,其中的信息可能已经有所发展或是发生改变。
Post 是 SQLAlchemy Model (对应 posts 表)
Tag 也是 SQLAlchemy Model (对应 tags 表)
post_tags 是关联上面两个 Model 的 Many-to-Many 的表
请问
从 posts 取出用于 posts.flag == 1 的 tags 全集
如何用 SQLAlchemy Query 表达
SELECT name
FROM tags
WHERE id
IN (
SELECT b.tag_id
FROM posts a, post_tags b
WHERE a.id = b.post_id
AND a.flag =1
);
3 条回复 • 1970-01-01 08:00:00 +08:00
|
|
1
yoyicue 2012-03-19 18:11:55 +08:00
@ lividv2ex 的 gist 支持坏掉了? 对于外部内容的支持 比如 weibo 的图床等等 缺少一个 help 页面 FAQ 的内容太老了.
|
|
|
2
Livid 2012-03-19 18:14:00 +08:00
今天下午在修改 https 支持的时候带来的新问题。
正在解决。稍等。
|
|
|
3
Livid 2012-03-19 18:29:00 +08:00
现在好了。
话说 gist 实在是太卡了。考虑是不是自己为它搭一个反向代理加速好了。
|