我有这个 SQL 和 PHP:
$articles = returndata("
SELECT
(SELECT COUNT(*) from blog_posts) as totalcount,
(SELECT COUNT(*) from comments where assetid = d.assetid) as replies,
c.name as categoryname,
d.category as categoryid,
d.assetid,
d.title,
d.postdate,
d.articlecontent
FROM blog_categories c
INNER JOIN
blog_posts d
GROUP BY d.assetid
ORDER BY postdate DESC
LIMIT " . (($page - 1) * $size) . ", " . $size
, $database);
我还有一个变量 $query,它包含一个多词查询(如“hello world”),我想用它来搜索我的数据库。我已经尝试了正确的事情(我认为),但它一直返回 0。