Quote from: BobRay at Jul 25, 2011, 04:13 AM
The db->query() methods have been deprecated for a while and are now gone in the latest versions. You can use PDO, or you can rewrite it using xPDO. There’s some information on that here:
http://bobsguides.com/revolution-objects.html
Thanks Bob.
I haven’t noticed that - modX->query() is the new function for $modx->db->select - and mixed it modx->db->query()
For those not familiar with xpdo like me, below are some functions that might be helpful.
OBSOLUTE --> $res = $modx->db->select($selectSQL , $fromSQL, $whereSQL , $OrderBy);
NEW --> $res = $modx->query("select * from table Where field1 =’a’");
OBSOLUTE --> $recordCount= $modx->db->getRecordCount($res);
NEW --> $recordCount = $res->rowCount();
OBSOLUTE --> $rows = $modx->db->makeArray( $res );
NEW --> $rows = $res->fetchAll();
OBSOLUTE --> $row = $modx->db->getRow($res);
NEW --> $row = $res->fetch();