Why I get error with this query on my live server but not on my wamp localhost?
SELECT
type as type,
COUNT(*) AS total
FROM page AS p
WHERE p.parent_id = p.page_id
the error message is,
SQLSTATE[42000]: Syntax error or access violation: 1140 Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
How can I get around to this?
my localhost return this result which is what I need,
type total
page 16