我有这个疑问这retrives从MySQL 10($限制)查询,单SQL检索来自不同表的不同的信息
"SELECT content.loc,content.id,content.title,
voting_count.up,voting_count.down
FROM
content,voting_count
WHERE names.id = voting_count.unique_content_id
ORDER BY content.id DESC $limit"
此查询那名媒体链接数据库,并把有票的帖子确实很大,但是新帖子不会显示。 投票行在首次投票时被“插入”。我想,他们不会被列为没有unique_content_id连接到的原因。
如果我更改查询到这一点:
"SELECT content.loc,content.id,content.title
FROM
content
ORDER BY content.id DESC $limit"
它的工作原理,但我不能访问voting_count.up & voting_count.down行。 我怎样才能访问单个查询中的两个信息?它可行吗?
这工作得更好,然后我预计,感谢您的时间来回答。 – Sutekh