9
The other option is to use the
ADODb PDO for
XOOPS 2.x series, it needs a minor adjustment which i can't put on the SVN to work, for the
fetchArray() and
fetchBoth() functions.. However it has a query cache as well so for
long queries or queries anyway you can cache them with a
file store.
See:
http://xoops.svn.sourceforge.net/viewvc/xoops/ThirdParty/adodb/releases/0.20/for example in
version 0.21 there is the
following change that fixes this issue of compatibility the other advantage of the PDO is the amount of
database's XOOPS Supports as well as being able to use
Store Proceedures.
1440 /**
1441 * Get a result row as an enumerated array
1442 *
1443 * @param resource $result
1444 * @return array
1445 */
1446 function fetchRow($result)
1447 {
1448 return @$result->FetchRow();
1449 }
1450
1451 /**
1452 * Fetch a result row as an associative array
1453 *
1454 * @return array
1455 */
1456 function fetchArray($result)
1457 {
1458 @$this->setFetchMode(ADODB_FETCH_DEFAULT)
1458 return (array)@$result->FetchObject();
1459 }
1460
1461 /**
1462 * Fetch a result row as an associative array
1463 *
1464 * @return array
1465 */
1466 function fetchBoth($result)
1467 {
1468 @$this->setFetchMode(ADODB_FETCH_DEFAULT)
1468 return (array)@$result->FetchObject();
1469 }
1470
1471 /**
1472 * XoopsMySQL_ADODBDatabase::fetchObjected()
1473 *
1474 * @param mixed $result
1475 * @return
1476 */
1477 function fetchObject($result)
1478 {
1479 @$this->setFetchMode(ADODB_FETCH_DEFAULT);
1480 return @$result->FetchObject();
1481 }