我这里有问题;当我进行查询时:
SELECT product.*,product_description.*,COUNT(product_image.*)
FROM " . DB_PREFIX . "product
INNER JOIN product_description ON product.product_id = product_description.product_id
INNER JOIN product_image ON product.product_id = product_image.product_id
ORDER BY product.date_modified DESC
我想为表 product_image 选择 3 个表 n 1 个计数,但出现此错误:
注意:错误:您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 1 行错误号:1064 SELECT product. ,产品描述。,COUNT(product_image. ) FROM product INNER JOIN product_description ON product.product_id = product_description.product_id INNER JOIN product_image ON product.product_id = product_image.product_id ORDER BY product.date_modified DESC