Open GoogleCodeExporter opened 9 years ago
SELECT DISTINCT COUNT(*) FROM `pramdevpeng`.`products` INNER JOIN
`pramdevpeng`.`category_has_products` ON
(pramdevpeng.category_has_products.productid = products.productid) INNER JOIN
`pramdevpeng`.`category` ON (pramdevpeng.category.cate_id =
pramdevpeng.category_has_products.cate_id) WHERE
((`pramdevpeng`.`category`.`left_value`>=1 and
`pramdevpeng`.`category`.`right_value`<=474 ) AND (productonline=1 and
manufacturer
like '%Phil & Teds%'))
Original comment by dualf...@gmail.com
on 3 May 2009 at 2:28
正确的查询应该是:
{{{
SELECT COUNT(*) FROM (SELECT DISTINCT `pramdevpeng`.`products`.* FROM
`pramdevpeng`.`products` INNER JOIN
`pramdevpeng`.`category_has_products` ON
(pramdevpeng.category_has_products.productid = products.productid) INNER JOIN
`pramdevpeng`.`category` ON (pramdevpeng.category.cate_id =
pramdevpeng.category_has_products.cate_id) WHERE
((`pramdevpeng`.`category`.`left_value`>=1 and
`pramdevpeng`.`category`.`right_value`<=474 ) AND (productonline=1 and
manufacturer
like '%Phil & Teds%'))
) TMP_ALIAS
}}}
Original comment by dualf...@gmail.com
on 3 May 2009 at 2:34
Original issue reported on code.google.com by
dualf...@gmail.com
on 3 May 2009 at 2:26