So, tried:
Quote
$SQL = "select pn_cid,COUNT(pn_cid)
from pn_admin_module
GROUP BY pn_cid;";
$result = DBUtil::executeSQL ($SQL);
( change prefix if testing from pn_ to whatever_ )
This, again, only returned a single row even though there should be 6 rows (admin categories) in my particular Zikula install.
The same SQL in any tool returns the correct number of rows - all the admin categories and the # of modules in each one.
So, is GROUP BY restricted to a single row somewhere in DBUtil or ADOdb? Even with an explicit LIMIT 0,50 it still only returns one row.
Can someone else test this and let me know if they see this behavior? Is there an ADOdb or DBUtil problem with GROUP BY? I followed DBUtil through and didn't see anywhere it should have problems. The SQL returned in the result set, stripped and applied directly to MySQL via another query tool returns the correct result - 6 rows with various counts.
I noticed the bug report had a bug on another COUNT DBUtil function:
http://code.zikula.org/core/ticket/49
Perhaps the same thing?
Thanks for any insight or testing...this has been driving me crazy....I may need to borrow simon's avatar
NCM
SwitchBit / UHEweb
